Tag Archives: apc_mmap

Plesk: 500 – Internal Server Error

The easiest way to check for what the issue is(as there could be a few different problems when seeing this error) is to check the Plesk log file which is located under :  /var/log/sw-cp-server/error_log .

In my case the issue was related to the apc_mmap module which was reporting “No space left on device”, here is the full error:

[Tue Jan 19 17:01:21 2010] [apc-error] apc_mmap: mmap failed: No space left on device
2010-01-19 17:01:21: (mod_fastcgi.c.1000) the fastcgi-backend /usr/bin/sw-engine-cgi -c /opt/psa/admin/conf/php.ini -d auto_prepend_file=auth.php3 -u psaadm failed to start:
2010-01-19 17:01:21: (mod_fastcgi.c.1004) child exited with status 2 /usr/bin/sw-engine-cgi -c /opt/psa/admin/conf/php.ini -d auto_prepend_file=auth.php3 -u psaadm
2010-01-19 17:01:21: (mod_fastcgi.c.1007) if you try do run PHP as FastCGI backend make sure you use the FastCGI enabled version.
You can find out if it is the right one by executing 'php -v' and it should display '(cgi-fcgi)' in the output, NOT (cgi) NOR (cli)
For more information check http://www.lighttpd.net/documentation/fastcgi.html#preparing-php-as-a-fastcgi-program
2010-01-19 17:01:21: (mod_fastcgi.c.1012) If this is PHP on Gentoo add fastcgi to the USE flags
2010-01-19 17:01:21: (mod_fastcgi.c.1105) [ERROR]: spawning fcgi failed.

An easy fix for this would be to modify the php.ini file for Plesk and take out the apc_mmap module.

The php.ini file that serves Plesk is located under /opt/psa/admin/conf/php.ini or /usr/local/psa/admin/conf/php.ini .

Just open the file with an editor(vi, nano) and comment the following lines:

apc.stat = 0
apc.shm_size = 40
apc.include_once_override = 1

Once done just restart Plesk and check you login URL as this issue should be fixed.

Like i said please check the error log file as the issue may be a bit different even though the error will still be reported as “500 – Internal Server Error”.