I’ve also noticed that during this time, several php processes are started and after I kill them and stop the scan, it takes a very long time for the memory usage to go back down. I mean, it takes HOURS for the memory to go down, and I can see it continuing to start new processes for a while.
Just noticed that I am also getting the following error on the dashboard: Wordfence Live Activity: Scan can’t continue – stored data not found after a fork. Got type: boolean
Did the scan previously work on this site? And if so, was the site recently moved from another server?
Although your max_execution_time in php.ini is long, it may be helpful to set “Maximum execution time for each scan stage” to a lower amount on the Wordfence options page, like 30 or 60 seconds, to allow temporary data to be cleared from memory more often.
If you use a caching plugin, the large number of files in the cache folders may be causing the scan to take longer than usual. You can exclude cache folders from scans by entering the locations in “Exclude files from scan that match these wildcard patterns” on the Wordfence Options page. Two common cache locations are:
wp-content/cache/*
wp-content/wfcache/*
The “stored data not found after a fork” error may be fixed by the above options — I believe it’s caused by an issue with storing temporary data, and we have a fix planned for a future version.
The memory usage may include files that the OS caches in memory (separate from the caching above), depending on how it is being measured. If you see individual php process and the memory usage doesn’t decrease when the PHP processes end, that is most likely the case, and usually should not cause trouble. If you use mod_php, this might not be the case — if it’s a server that you run yourself and it’s not shared hosting, there may be some additional changes you could make to reduce memory usage.
Let me know if this helps, or if you are still having trouble with scans completing.
-Matt R
Went through the site and found some HUGE old backup files (like 420M big!). Deleted those and the scan ran a whole lot better. Still gave the message that it was exceeding available memory, but at least the scan finished and the memory went right back down when it was done. I also set the value above to 30 and excluded some other big backup files that can’t be removed. Getting better.
Ok, great. If it does have any more problems, let us know.
-Matt R