• Resolved alexDx

    (@alexdx)


    We are getting this error DAILY (sometimes multiple times a day):

    PHP message: PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 69632 bytes) in /public/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php on line 1575" while reading response header from upstream, client: 34.148.181.37, server: fairwoodplazavet.com, request: "GET /?wordfence_syncAttackData=1733757688.1833 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php8.1-fpm-fairwoodplazavet.sock:

    We’ve checked logs and don’t find any issue, we’ve had our hosting increase our memory limit (now 512MB), We’ve turned off automatic scans.

    We reached out to our host (Kinsta) and they responded with:

    The memory limit is already set to 512 MB. I am not seeing big files or databases. In my opinion, this is the WordFence itself with code causing memory leakage.

    Seems to happen at random times throughout the day (never the same time).

    Just looking for any help or insight here as we have hit a wall trying to figure this out. If we can’t resolve, we’ll just have to find another firewall plugin for the site.

    • This topic was modified 1 month, 2 weeks ago by alexDx.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter alexDx

    (@alexdx)

    The error happens in BOTH live and staging environments. When I go to the Wordfence Tools page, we see the error in logs.

    Thread Starter alexDx

    (@alexdx)

    Also, The error is still there after I deactivated all plugins and switched the theme to a default one.

    Plugin Support wfpeter

    (@wfpeter)

    Hi @alexdx,

    The error you’re seeing is connected to memory exhaustion outside of PHP, so increasing the memory limit will most likely just delay the inevitable rather than prevent it in this case.

    Errors like Allowed memory size of x bytes exhausted (tried to allocate x bytes), or Out of memory (allocated X) (tried to allocate X bytes) are almost always occurring somewhere else on the server. There’s a chance that the issue becomes prominent during Wordfence’s scans due to requiring some memory, but it’s not the root cause from our multiple tests with other customers.

    Your operating system/web server log files will likely show if memory is being exhausted somewhere outside of PHP and why. This is usually a job for your hosting company or system administrator as they have access to those logs, can diagnose the source and potentially resolve the problem. Shared servers especially could be susceptible to this problem, but that’s just a common cause and may not necessarily be the case for you.

    Thanks again,
    Peter.

    Thread Starter alexDx

    (@alexdx)

    I’ve had my hosting look into this and they ensure me that it is the plugin. These errors are only happening when Wordfence is active on the site. It happens on other servers and environments as well, so what you are saying is not correct. I’m happy to provide diagnostic information, but it is your plugin causing the issue.

    Thread Starter alexDx

    (@alexdx)

    This error kept happening even after completely moving to another host, deactivating all plugins and activating a default WordPress theme. Its obvious at this point that Wordfence was the issue.

    I removed Wordfence entirely and decided to go with: https://wordpress.org/plugins/better-wp-security/

    Will be using this plugin on our 300 websites.

    Plugin Support wfpeter

    (@wfpeter)

    Hi @alexdx,

    Your choice of plugin is of course down to what works for you and whilst we make as many attempts to run on a wide range of server/operating system/CDN platforms out of the box as possible, and regularly improve efficiency of our scans, there may regrettably be circumstances such as this.

    Regardless of your position on using Wordfence into the future, if you still have any site diagnostic outputs from Wordfence > Tools > Diagnostics that might show the environment that some (or all) of these sites were using, and log files showing which queries or operations your host has identified Wordfence is responsible for, our QA team would be more than happy to still review them.

    Many thanks,
    Peter.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.