APC and shm_size above 250MB throws error

Discussion in 'Install/Configuration' started by Sindre, Aug 27, 2013.

  1. Sindre

    Sindre Member

    Hello,

    I am having a problem with APC in LiteSpeed. If I set apc.shm_size to anything above 251M, the page will not load and core dumps are generated in /usr/local/lsws/fcgi-bin

    Also, a lot of these entries show up in the error_log:

    [27-Aug-2013 20:41:22 UTC] PHP Fatal error: PHP Startup: apc_mmap: mmap failed: in Unknown on line 0

    Seems like some sys limit is kicking in, but can't figure out where to find it. I am running CloudLinux with CageFS and LiteSpeed with suEXEC.

    Any help will be appreciated.
  2. mistwang

    mistwang LiteSpeed Staff

  3. Sindre

    Sindre Member

    Thanks, but I don't think that is the problem. Memory soft limit is already set to 450M.
  4. mistwang

    mistwang LiteSpeed Staff

    there is a memory limit in php.ini as well.
  5. Sindre

    Sindre Member

    PHP memory_limit is set to 1024M
  6. NiteWave

    NiteWave Administrator

    see if following directive helps:
    apc.mmap_file_mask = /tmp/apc.XXXXXX
    (add to php.ini)

    please try to raise the soft/hard limit anyway, see if any difference.
  7. NiteWave

    NiteWave Administrator

    also, please check LVE limit, if it's big enough.
  8. Sindre

    Sindre Member

    Thanks. I removed the soft/hard limit completely (will be limited by LVE anyway), and guess what; it worked :) Strange...
  9. mistwang

    mistwang LiteSpeed Staff

    So, you removed soft/hard memory limit for lsphp5 extapp ?
  10. Sindre

    Sindre Member

    Correct. Even though it was already set much higher than 256MB.

Share This Page