Our customer experienced an error using Amelia Forms. It would not load properly even though we had added its scripts to the exception list in WP Rocket. So we decided to investigate. The only errors in logs we found were from yesterday and were not related to Amelia but to Wordfence. It seemed it did not have enough memory to run test.
2023/10/17 18:03:20 [error] 82871#82871: *22824 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 163840 bytes) in /home/ploi/site.nl/public/wp-includes/pomo/mo.php on line 302; PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) in /home/ploi/site.nl/public/wp-includes/pomo/streams.php on line 127" while reading response header from upstream, client: 185.107.90.226, server: site.nl, request: "POST /wp-admin/admin-ajax.php?action=wordfence_testAjax HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.2-fpm.sock:", host: "site.nl"
Then we realized the
WP_MEMORY_LIMIT
was not set limiting memory to default 40 MB only. So we added it to `wp-config.php` using
define('WP_MEMORY_LIMIT', '256M');
This is the amount most WordPress developers use for regular sites. For WooCommerce sites of sites with heavy plugins you made need more.