. Advertisement .
..3..
. Advertisement .
..4..
In Plesk, I had an unsuccessful operation with the following error messages:
PLESK_INFO: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 16384 bytes) in /path/to/plesk/file.php on line 228
How can I fix the fatal error: allowed memory size of 268435456 bytes exhausted? Please help me. Thanks a lot.
The cause: The reason for the fatal error: allowed memory size of 268435456 bytes exhausted is that the PHP back-end of Plesk exceeds the memory limit. This could occur if the thing being operated on has a complicated structure.
Solution:
Solution for Plesk on Linux
SSH
, connect to the Plesk server.vi editor
in this example:# vi /usr/local/psa/admin/conf/php.ini
3. Raise the
memory_limit
limit to 5124. Save the modifications then close file
5. The Plesk management service to be restarted:
# service sw-engine restart && service sw-cp-server restart
6. Retry the unsuccessful procedure you just did. Restart the services and increase the
memory_limit
limit if it continues to fail with the same problem.7. Replace the following line in /etc/cron.daily/50plesk-daily using a text editor to stop the modifications from being undone during the Plesk update:
-On CentOS/RHEL-based, use with:
-On Debian/Ubuntu-based, use with:
Solution for Plesk on Windows Server
RDP
to establish a connection to the Plesk server.%plesk_dir%adminconfphp.ini
file for Plesk PHP.Launch PowerShell and execute each command individually:
PS import-module WebAdministration
net stop “Plesk PopPass Service”
net stop “Plesk Management Service”
net start “Plesk Management Service”
net start “Plesk PopPass Service”
Restart-WebAppPool PleskControlPanel
memory_limit
value to a higher number and restart the services if it still fails with the same problem.