WordPress seems to ignore WP_MEMORY_LIMIT / admin-ajax.php 500 error
-
Hi, got a strange scenario occurring and hope you can help.
We have a client site that uses WooCommerce, but is regularly (yet inconsistently) plagued by the dreaded PHP Fatal error due to memory exhausted. This oddly results in customers being unable to complete their purchases due to issues with admin-ajax.php (assuming the two issues are related).
We spoke to our host, and they have increased memory_limit to 128M so we added define(‘WP_MEMORY_LIMIT’, ‘128M’); to wp-config.php – and WooCommerce’s System Status also recognises that “WP Memory Limit: 128 MB”.
However, we are still seeing PHP Fatal errors in our log that seem to indicate that WordPress only thinks it has 64M:
PHP Fatal error: Allowed memory size of <em>67108864 bytes</em> exhausted (tried to allocate 215070 bytes) in /home/clientname/public_html/wp-includes/functions.php on line 377
These PHP Fatal errors also coincide with admin-ajax.php throwing this error:
Failed to load resource: the server responded with a status of 500 (Internal Server Error) admin-ajax.php
.So my questions are these:
Why would WordPress still think it only has 64M of memory, when WooCommerce knows the real limit?
Are the memory limit errors causing the admin-ajax.php errors, or vice versa?
What can we do to rectify these issues?
Any replies are VERY much appreciated, thanks to this problem we’re going grey and losing hair all at the same time.
- The topic ‘WordPress seems to ignore WP_MEMORY_LIMIT / admin-ajax.php 500 error’ is closed to new replies.