PHP Out of memory when running a scan
-
I have a live website on which we’re trying to run a Wordfence scan, but the scan keeps failing due to it exceeding the available memory. The website is on a dedicated server with 3GB of RAM. When we first ran into the problem, I noticed that the PHP memory limit was set to 32MB, so we increased it to 96MB and set Wordfence to “Use low resource scanning”. When the scan failed again for the same reason, we increased the PHP memory limit to 128MB, 256MB, and so on, and so forth. Ultimately, it took setting the PHP memory limit to something ridiculous, 768MB, before the scan would complete without running out of memory.
As far as the scan options, all are enabled except for the following…
* Scan theme files against repository versions for changes
* Scan plugin files against repository versions for changes
* Scan files outside your WordPress installation
* Scan images, binary, and other files as if they were executableAnd here is an export of all of the Wordfence settings for reference
1e1c8b7401fb4e374144f3c399755887553efcbc8192c02576803a91862f733def5420c685f8b5542b87ca486b05b273509cb70a4e5192a8065baa3c8ec490dde000d6c648c23826272058a3381c0ab5My question is, why is Wordfence using so much memory for a simple scan, and when set to use low resource scanning? I’ve used these same settings for probably a hundred other WordPress websites and none have even come close to needing that much memory for a Wordfence scan. So, what’s the deal? What is is about this particular site that is so troublesome? What causes a scan to use up that much memory when just scanning WordPress itself and not scanning any images as if they were executable? It doesn’t make sense.
- The topic ‘PHP Out of memory when running a scan’ is closed to new replies.