psa service does not start: Unable to allocate shared memory segment

Created:

2017-05-15 20:45:46 UTC

Modified:

2017-08-16 17:04:12 UTC

0

Was this article helpful?


Have more questions?

Submit a request

psa service does not start: Unable to allocate shared memory segment

Applicable to:

  • Plesk for Linux

Symptoms

Plesk shows a '502 Bad Gateway' error as the psa service is not started.

When attempting to start the service manually, the following error appears:

[root@vzcontainer ~]# service psa start
Starting psa... Starting sw-engine-fpm: Fri Jul 18 22:57:06 2014 (8118): Fatal Error Unable to allocate shared memory segment of 104857600 bytes: mmap: Cannot allocate memory (12)
[FAILED] failed
Starting xinetd service... done
Starting sw-cp-server service... done
Starting mysqld service... done
Starting named service... done
Starting postgresql service... not installed
Starting spamassassin service... not installed
Plesk: Starting Mail Server... already started
Starting psa... Starting sw-engine-fpm: Fri Jul 18 22:57:08 2014 (8223): Fatal Error Unable to allocate shared memory segment of 104857600 bytes: mmap: Cannot allocate memory (12) [FAILED] failed

Plesk is installed inside a Virtuozzo container. The container is experiencing a lack of some UBC resources. For example, 'shmpages':

# cat /proc/user_beancounters | grep shmpages

shmpages 1836 1836 32768 49152 40

Cause

Lack of UBC resources on the container.

Resolution

If there is an access to the Hardware Node, use the resolution below.

Increase the amount of the corresponding UBC limit for the container (while logged into the Virtuozzo node) to at least 40960:

[root@vznode ~]# vzctl set 10001 --shmpages 40960 --save

If there is no access to the Hardware Node, contact provider of VPS to increase the limits for the container.

Alternatively, decrease PHP memory consumption in '/usr/local/psa/admin/conf/php.ini' , change the parameter(create if does not exist) 'opcache.memory_consumption' to lower value:

    opcache.memory_consumption=64

Have more questions? Submit a request
Please sign in to leave a comment.