i-MSCP >= 1.3.1 and PHP opcache - Unable to allocate shared memory segment

  • Dear community,


    If during the update, you get the following error (When PHP-FPM is restarted):


    Code
    1. Fatal Error Unable to allocate shared memory segment of xxxxxxxxxx bytes: mmap: Cannot allocate memory (12)

    This mean that you do not have sufficient memory available on your system. This generally occurs in virtualized environments (OpenVZ, LXC...) Indeed, the free -m output can lie... To fix the problem you must either disable opcache, or decrease the max memory assigned to it.


    • If you want to disable opcache, edit the /etc/imscp/php/php.data file and set the PHP_OPCODE_CACHE_ENABLED parameter value to 0
    • If you want to lower the memory, edit the /etc/imscp/php/php.data file and change the PHP_OPCODE_CACHE_MAX_MEMORY value

    Once done, save the changes and run:


    Code
    1. cp /etc/imscp/php/php.data /etc/imscp/php/php.old.data

    Then, restart the i-MSCP installer.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • After editing /etc/imscp/php/php.data file which imscp command I have to call so the new settings take effect?

    Then, restart the i-MSCP installer.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206