The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

APC Cache files expire Issue with FastCgi

Discussion in 'Workarounds and Optimization' started by ahmedeqbal, Mar 13, 2014.

  1. ahmedeqbal

    ahmedeqbal Registered

    Joined:
    Mar 13, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hello,

    we have properly installed APC cache on our WHM based server, we have set to expire each file in few hours, but all cached file lost in few seconds.

    Our APC Settings:


    apc.cache_by_default 1
    apc.canonicalize 1
    apc.coredump_unmap 0
    apc.enable_cli 0
    apc.enabled 1
    apc.file_md5 0
    apc.file_update_protection 2
    apc.filters
    apc.gc_ttl 3600
    apc.include_once_override 0
    apc.lazy_classes 0
    apc.lazy_functions 0
    apc.max_file_size 10M
    apc.mmap_file_mask
    apc.num_files_hint 1000
    apc.preload_path
    apc.report_autofilter 0
    apc.rfc1867 0
    apc.rfc1867_freq 0
    apc.rfc1867_name APC_UPLOAD_PROGRESS
    apc.rfc1867_prefix upload_
    apc.rfc1867_ttl 3600
    apc.serializer default
    apc.shm_segments 1
    apc.shm_size 500M
    apc.shm_strings_buffer 4M
    apc.slam_defense 1
    apc.stat 1
    apc.stat_ctime 0
    apc.ttl 0
    apc.use_request_time 1
    apc.user_entries_hint 4096
    apc.user_ttl 0
    apc.write_lock 1
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    Hi Michael,

    Have the same problem with PHP 5.3.

    Could you give any advice?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  5. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    Hi Michael

    I downloaded the source code from PECL (http://pecl.php.net/get/APC-3.1.13.tgz) and then:
    --
    tar zxvf APC-3.1.13.tgz
    cd APC-3.1.13
    phpize
    ./configure --enable-apc --enable-apc-mmap --with-php-config=/usr/local/bin/php-config
    make
    make install

    In php.ini
    --
    extension="apc.so"
    apc.enabled=1
    apc.shm_segments=1
    apc.shm_size=64

    The cache is working, however it only lasts for a few minutes and restarts itself. I can see the cache statistics from the apc control panel which comes with the source code.

    I have these fcgid options in /etc/httpd/conf/php.conf
    --
    FcgidMaxRequestsPerProcess 1000
    FcgidProcessLifeTime 7200
    FcgidMaxProcesses 300
    FcgidIOTimeout 120
    FcgidIdleTimeout 600
    FcgidBusyScanInterval 120
    FcgidErrorScanInterval 5
    FcgidZombieScanInterval 5
    FcgidMinProcessesPerClass 0
    FcgidMaxProcessesPerClass 6
    FcgidMaxRequestLen 20468982

    PHP 5.3.28
     
    #5 goodmove, Jun 12, 2014
    Last edited: Jun 12, 2014
Loading...

Share This Page