All websites are down with Internal Server Error 500
Cpanel wasn’t loading with the following error:
Internal Server Error
Can’t fork: Cannot allocate memory at /usr/local/cpanel/Cpanel/SafeRun/InOut.pm line 40.
cpsrvd/188.8.131.52 Server at hostname.example.com
How I fixed it?
First of all I was trying to increase this limit by searching for “Max cPanel process memory” in:
“WHM Home » Server Configuration » Tweak Settings”
It was already over 512MB, the default value of 768MB. I increased to 1024MB. The Cpanel restart was unsuccessful.
As last resort I run the following commands:
service cpanel restart
The first command will upgrade cPanel even if you got latest version of cPanel, in order to rule out any update inconsistencies. Depending on the server configuration, this may run for about 10 minutes.
The second command will restart cPanel.
I hope that was helpful for you.