Wordfence Ouf of Memory on big site with caching
-
Hi folks,
We finally managed to find the root cause why certain sites keep on going down, frequently taking the whole server with it. These are large websites which are frequently visited by all sorts of bots (some legit, many not) to a point they get more traffic from non-humans than from actual visitors.
To speed it up we installed w3tc total cache, with Page cache set on Disk (enhanced), which uses .htaccess to serve the static content, has increased the performance significantly, however, sporadically, every 10 or 20 uncached pages that get visited result in an out of memory error (so this is almost every second due to the amount of traffic), the php error mentioning it is Wordfence running out. At such requests, the caching succeeds, the user get served a 500 error, but only after a refresh the cached content is shown.
The problem seems to be gradually increasing, getting 500 errors more frequently. Disabling Wordfence has solved all these issues. When we investigate the database, we notice its keeping track of the new cache files being created (and probably scanned / checked), which is growing exponentially. Preferably, Wordfence should not be adding extra load at this point.
PHP execution time is set to 60 seconds and a memory limit of 1024MB.
Before we try to make a switch to a different plugin to see if those handle memory issues better, we figured we would first ask here. The site is also behind a cloudflare, so basically we mostly only want malware protection, likely could do without the firewall if its causing this much extra load.
Any idea’s or suggestions to make Wordfence less demanding even if it’s at the cost of live protection?
- The topic ‘Wordfence Ouf of Memory on big site with caching’ is closed to new replies.