Plesk

Websites, webmail or Plesk are not accessible: Cannot allocate memory (12)

Symptoms

Cause

Container limit shmpages is exceeded by OPcache, which needs more, than segments available.

Resolution

Change OPcache limit

  1. Connect to the server via SSH.

  2. Check current segment size:

    # ipcs -lm
    ------ Shared Memory Limits --------
    max number of segments = 4096
    max seg size (kbytes) = 32768
    max total shared memory (kbytes) = 8388608
    min seg size (bytes) = 1

  3. Log in to Plesk.

  4. Go to Tools & Settings > PHP Settings > <PHP version, that has many domains> > php.ini.

  5. Uncomment opcache.memory_consumption option and set it equal to the segment limit (In this case 32) - changes applied automatically to all the domains, that are using this PHP version.

Increase number of segments

Note: If you have access to the Hardware Node, use the resolution below. If not, contact your provider to increase the limit for you.

  1. 1.Connect to the server via SSH.

  2. Increase the amount of the corresponding UBC limit for the container to at least 40960:

    # vzctl set 10001 --shmpages 40960 --save

Exit mobile version