• Resolved Tommy

    (@baptistej)


    Hello,

    I get a lot of 404 errors on my site. People are trying to access deleted static files.

    Because of “try_files $uri $uri/ /index.php?$args;” set by W3 on static files they can saturate my server RAM really quick. (PHP-fpm)

    How can I make sure this line is not added to static files automatically?

    Wordpress actually recommend to not touch PHP for static files.

    Nginx

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @baptistej

    Thank you for reaching out and I am happy to assist you with this.
    Can you please share which Page Cashing method you are using and have you tried manually deleting the /cache/ folder (if using disk) and purging all cache and see if the problem persists?
    Thanks!

    Thread Starter Tommy

    (@baptistej)

    Hello,

    Yes, the issue is caused by ““try_files $uri $uri/ /index.php?$args;” added to static files. When you have a lot of traffic and 404 errors it will cause some memory issue.

    I have disabled Browser Caching from W3 and added my own NGINX rules without this line.

    I think W3 should not add this line to static files. It’s bad for performance, NGINX should handle the 404 errors and NOT WordPress.

    This blog post explain my issue.

    https://wphelp.blog/manage-404-errors-static-files-from-the-server/

    Just a suggestion.

    Thanks.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @baptistej

    Thank you for your feedback.
    One more question, was the option “Do not process 404 errors for static objects with WordPress” enabled in the Browser Cache settings?
    As you can see in the description: If enabled – you may get 404 File Not Found response for some files generated on-the-fly by WordPress plugins.

    Thanks!

    Thread Starter Tommy

    (@baptistej)

    @vmarko

    I wasn’t aware this option existed. It was not enabled, but enabling this option actually fix my issue.

    Thank you.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @baptistej

    You are most welcome!

    We would really appreciate it if you could take a minute and post a review here. This will help us to continue offering a top-notch product to users.
    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘404 errors causing website crash.’ is closed to new replies.