Cobra Forum

Plesk Panel => Webserver => Topic started by: Suhitha on Dec 23, 2025, 03:42 AM

Title: A website hosted on a Plesk server shows a 500 or 504 error: Allowed memory size
Post by: Suhitha on Dec 23, 2025, 03:42 AM
Question: A website hosted on a Plesk server shows a 500 or 504 error: Allowed memory size of XXX exhausted


Applicable to:


Symptoms


500 Internal Server Error
504 Gateway Timeout
There has been a critical error on your website.
Learn more about debugging in WordPress.


Note:
Logs location on a Linux server: /var/www/vhosts/system/example.com/logs/error_log
Logs location on a Windows server: %plesk_vhosts%\example.com\logs\php_errors\example.com\php_error.log

Error example for Linux:

AH01071: Got error 'PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 28672 bytes) in /var/www/vhosts/example.com/httpdocs/moodle/lib/filestorage/stored_file.php on line 1143', referer:[color=navy] https://example.com/user/index.php?id=10[/color]
Error example for Windows:

PHP Fatal error: Allowed memory size of XXX bytes exhausted (tried to allocate XXX bytes) in C:\Inetpub\vhosts\example.com\httpdocs\wp-config.php on line 91

Cause

The website reaches the PHP memory limit and thus generates web servers errors which make it unavailable or processed very slowly by the web server.


Resolution

1.Log into Plesk

2.Go to Domains > example.com > PHP Settings and increase memory_limit value according to the application requirements, by using the instructions from the following article:
How to change PHP memory_limit value via Plesk?

Note: the following shortcuts should be used for memory_limit value: K (kilobytes), M (megabytes), and G (gigabytes). If the "free -mh" command shows not enough RAM, contact your Cloud hosting provider to increase it