500 errors on website / memory exhausted

Hi my website is getting intermittent 500 errors. I do see some errors in the logs:

[13-Oct-2023 19:56:56 UTC] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 2378944 bytes) in /home/xyzxyz/public_html/wp-content/wflogs/rules.php on line 4896

The graphs show plenty of available memory. I also have this set in my wp-config.php file:

define( ‘WP_MAX_MEMORY_LIMIT’ , ‘1024M’ );
define( ‘WP_MEMORY_LIMIT’ , ‘1024M’ );

Any suggestions to help with the performance?

SYSTEM INFORMATION
OS type and version Ubuntu 22.04.3 LTS (GNU/Linux 5.15.0-84-generic x86_64)
Webmin version 2.101
Virtualmin version 7.8.2
Related packages SUGGESTED

Your WordPress configuration has no control over the allowed memory size in PHP.

You need to configure PHP to allow larger memory allocations. Where you configure that depends on your execution mode. If using the recommended php-fpm, you can probably set it in Virtualmin->domainname->Services->PHP-FPM Configuration->Maximum memory allocation

You probably need to restart the php-fpm service to apply changes.

1 Like

Thanks Joe, I’ll give that a try.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.