Wordfence causing memory size exhausted error
-
At some point in the last week, my test website https://test.sustainability-in-practice.org.uk has started giving a memory size exhausted error message, e.g.
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /var/sites/t/test.sustainability-in-practice.org.uk/public_html/wp-includes/wp-db.php on line 1972
After a bit of troubleshooting, I discovered that the error goes away if I deactivate Wordfence and returns when I reactivate the plugin. So it would appear that the error is related to the running of Wordfence in some way.
A few weeks ago the site was hacked but it has since been restored to a pre-hack version and all hacker-created files and directories deleted and the site now passes Wordfence and Succuri integrity tests. However, bots keep trying to access files that were put on the site during the hack. I have configured the Wordfence Firewall to block all IP addresses that try to access the now non-existent directories and hoped that, after a while, the traffic would die down. However the attempts keep coming – more than 26,000 blocks of USA IP addresses in the last 7 days, almost 5,000 blocks from UK, 1500 from Canada, 1000 from India and so on.
I am, therefore, wondering if it the blocking of all this traffic that is causing the memory problem. The live site https://sustainability-in-practice.org.uk/ which has a more or less identical installation of plugins has no memory problem. This site wasn’t hacked and the Wordfence Firewall reports only a very small number of blocks.
Can anyone suggest a solution to this problem? I don’t want to risk leaving the test website without Wordfence protection.
[Adding ‘WP_MEMORY_LIMIT’ to the wp-config.php file has no effect but the Wordfence memory check confirms that ‘your web host allows you to use at least 256.00 megabytes of memory for each PHP process hosting your WordPress site.’]
The page I need help with: [log in to see the link]
- The topic ‘Wordfence causing memory size exhausted error’ is closed to new replies.