PHP Warning: “Failed to set memory limit”
-
My error logs are filling up with lines that look like this:
PHP Warning: Failed to set memory limit to 33554432 bytes (Current memory usage is ______ bytes) in Unknown on line 0
There are hundreds of lines like this, so the error logs grow very quickly.
I also sometimes see:
PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate XXXXXX bytes) in /.../wp/wp-content/wflogs/rules.php on line 1397
I am running PHP 8 on an Apache system using PHP-FPM. To debug I have tried to check everywhere I could think of to find why the system would be trying to set memory to 32M, as of course memory limits on my system are much higher than that.
In reviewing my logs, I first see this error on 27 January 2022 — nothing prior to that. I have multiple sites on a virtual server running WordPress with Wordfence, and but am only seeing these errors on one site.
Any suggestions as to what to look for to debug?
- The topic ‘PHP Warning: “Failed to set memory limit”’ is closed to new replies.