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.

Sometimes Apache hangs (FastCGI + APC)

Discussion in 'Workarounds and Optimization' started by teo_, Aug 27, 2014.

  1. teo_

    teo_ Member

    Joined:
    Nov 21, 2008
    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    3
    I’m trying to tuning a VPS with WHM for a single website.
    Sometimes, specially when I have more than 50 users connected, Apache hangs: I get a lot of "W" Sending Reply status from WHM » Home » Server Status » Apache Status and after some minutes the site get to work again.
    During this problematic status CPU are not loaded and memory isn’t full.
    I’ve captured Apache status and mysqlmymonlite report during the problematic minutes (attached) and here some relevant settings:

    Code:
     /usr/local/lib/php.ini
    [APC]
    apc.enabled = 1
    apc.shm_segments = 1
    apc.shm_size = 512M
    apc.num_files_hint = 10000
    apc.stat = 0
    
     /usr/local/apache/conf/includes/post_virtualhost_global.conf
    <IfModule mod_fcgid.c>
    MaxRequestsPerProcess 2000
    FcgidMaxProcesses 80
    FcgidProcessLifeTime 240
    MaxProcessCount 100
    FcgidIOTimeout 240
    FcgidIdleTimeout 60
    FcgidIdleScanInterval 90
    FcgidBusyTimeout 300
    FcgidBusyScanInterval 80
    ErrorScanInterval 3
    ZombieScanInterval 3
    DefaultMinClassProcessCount 0
    DefaultMaxClassProcessCount 6
    FcgidMaxRequestLen 1073741824
    </IfModule>
    
    /etc/my.cnf
    [mysqld]
    innodb_file_per_table=1
    max_allowed_packet=268435456
    key_buffer_size=64M
    query_cache_type=1
    query_cache_size=96M
    query_cache_limit=2M
    sort_buffer_size=8M
    table_cache=4092
    innodb_buffer_pool_size=356M
    innodb_flush_log_at_trx_commit=2
    innodb_thread_concurrency=2
    thread_cache_size=4
    join_buffer_size=2M
    tmp_table_size=32M
    max_heap_table_size=32M
    max_connections=100
    Can you help me to understand why it happens?
     

    Attached Files:

  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. teo_

    teo_ Member

    Joined:
    Nov 21, 2008
    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    3
    Thanks for your answer Michael, nothing of interest at my eyes.
     

    Attached Files:

  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Please keep in mind that you may receive more user-feedback for optimization if you post snippets of the errors in CODE tags instead of attaching the entire log.

    Thank you.
     
  5. teo_

    teo_ Member

    Joined:
    Nov 21, 2008
    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    3
    Thanks for the suggestion: I’ve found only warnings related to FCGI in /usr/local/apache/logs/error_log for the "hang time slot"
    Code:
    [Tue Aug 26 19:15:49.612361 2014] [fcgid:warn] [pid 19097] [client 212.124.191.107:54951] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5
    [Tue Aug 26 19:15:50.153824 2014] [fcgid:warn] [pid 19113] [client 93.38.113.130:32936] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5, referer: http://WWW.MASKEDHOST.EXT/fraternita/cellole/lavoro-a-cellole
    [Tue Aug 26 19:15:50.720636 2014] [fcgid:warn] [pid 19072] [client 178.154.243.74:43685] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5
    [Tue Aug 26 19:15:53.182748 2014] [fcgid:warn] [pid 19055] [client 37.58.100.181:34372] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5
    [Tue Aug 26 19:15:55.391538 2014] [fcgid:warn] [pid 19134] [client 82.187.216.230:2056] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5, referer: https://WWW.MASKEDHOST.EXT/lavoro/acquista/olio
    [Tue Aug 26 19:15:57.493557 2014] [fcgid:warn] [pid 19135] [client 79.16.172.243:51148] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5, referer: http://WWW.MASKEDHOST.EXT/fraternita/cellole/la-pieve-cellole/la-chiesa-cellole
    [Tue Aug 26 19:15:58.035601 2014] [fcgid:warn] [pid 19136] [client 87.25.5.10:64315] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5
    [Tue Aug 26 19:15:59.163578 2014] [fcgid:warn] [pid 19124] [client 93.38.113.130:32937] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5, referer: http://WWW.MASKEDHOST.EXT/fraternita/cellole/lavoro-a-cellole
    [Tue Aug 26 19:15:59.783090 2014] [fcgid:warn] [pid 19087] [client 82.187.216.230:3506] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5, referer: https://WWW.MASKEDHOST.EXT/lavoro/acquista/olio
    [Tue Aug 26 19:16:00.325320 2014] [fcgid:warn] [pid 19133] [client 79.41.104.155:49561] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5, referer: http://WWW.MASKEDHOST.EXT/priore/articoli?start=230
    [Tue Aug 26 19:16:01.212326 2014] [fcgid:warn] [pid 19139] [client 95.233.60.117:57486] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5, referer: http://WWW.MASKEDHOST.EXT/priore/articoli
    [Tue Aug 26 19:16:01.213094 2014] [fcgid:warn] [pid 19138] [client 72.77.175.243:50921] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5, referer: http://WWW.MASKEDHOST.EXT/en/prayer/lectio-divina/1751-pray?start=2
    [Tue Aug 26 19:16:01.271933 2014] [fcgid:warn] [pid 19061] [client 2.192.26.52:50028] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5, referer: http://WWW.MASKEDHOST.EXT/preghiera/per-pregare-con-noi/lezionario
    [Tue Aug 26 19:16:03.686871 2014] [fcgid:warn] [pid 19032] [client 123.125.71.96:60578] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5
    [Tue Aug 26 19:16:04.548563 2014] [fcgid:warn] [pid 19100] [client 188.63.238.36:53769] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5
    [Tue Aug 26 19:16:04.595250 2014] [fcgid:warn] [pid 19137] [client 93.38.113.130:32939] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5
    [Tue Aug 26 19:16:05.142426 2014] [fcgid:warn] [pid 19041] [client 82.187.216.230:3277] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5, referer: https://WWW.MASKEDHOST.EXT/lavoro/acquista/olio
    [Tue Aug 26 19:16:06.009796 2014] [fcgid:warn] [pid 19140] [client 151.49.56.70:49432] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5, referer: http://duomosandona.netsons.org/
    [Tue Aug 26 19:16:06.795535 2014] [fcgid:warn] [pid 19141] [client 79.22.46.210:24000] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5, referer: http://WWW.MASKEDHOST.EXT/preghiera/vangelo
    [Tue Aug 26 19:16:07.197494 2014] [fcgid:warn] [pid 19142] [client 2.192.26.52:50033] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5, referer: http://WWW.MASKEDHOST.EXT/
    [Tue Aug 26 19:16:07.320954 2014] [fcgid:warn] [pid 19101] [client 79.26.168.203:51273] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page