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.

Apache doesn't kill unused process

Discussion in 'EasyApache' started by Takkero, May 11, 2011.

  1. Takkero

    Takkero Member

    Joined:
    Oct 5, 2003
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Hi guy :)

    i have a problem with my apache server installed via WHM to the lastest versione 2.2.17. The problem is that apache doesn't kill the unused process and this process after few time takes all my server memory RAM making it swapping.

    i see that if i use via SSH the command: "killall php" my ram use lower very much! I have 1 GB Ram in my VPS and when the server is at:

    Memory Used 61.02%

    using "Killall php"

    Memory Used 22.73%

    in 1 second i free something like 400MB of memory!!

    why my apache doesn't kill the process?

    Server Information:
    Total processors: 1

    Processor #1
    Vendor GenuineIntel
    Name Intel(R) Xeon(R) CPU E5420 @ 2.50GHz
    Speed 2493.748 MHz
    Cache 6144 KB

    Current Memory Usage

    total used free shared buffers cached
    Mem: 1048576 996220 52356 0 9712 329436
    -/+ buffers/cache: 657072 391504
    Swap: 1048568 65076 983492
    Total: 2097144 1061296 1035848

    so i have 1 CPU and 1 GB RAM Guaranted.

    in Main >> Service Configuration >> Apache Configuration >> Global Configuration
    i make this configuration:

    TraceEnable: ON
    ServerSignature: OFF(Pci Recomended)
    ServerToke: FULL
    FileETag: ALL
    StartServers: 4
    MinSpareServers: 10
    MaxSpareServers: 30
    ServerLimit: 300
    MaxClients: 300
    MaxRequestPerChild: 10000
    KeepAlive: On
    KeepAliveTimeout: 2
    MaxKeepAliveRequest: 100
    TimeOut 60

    Main >> Service Configuration >> Configure PHP and SuExec


    Current Configuration
    Option Configured Value
    Default PHP Version (.php files) 5
    PHP 5 Handler fcgi
    PHP 4 Handler none
    Apache suEXEC on



    why my apache doesn't kill unused process???? :eek::(
     
    #1 Takkero, May 11, 2011
    Last edited: May 11, 2011
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    What PHP handler are you using on this machine? You can see the handler in WHM > Apache Configuration > PHP and SuExec Configuration area.
     
  3. Takkero

    Takkero Member

    Joined:
    Oct 5, 2003
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Main >> Service Configuration >> Configure PHP and SuExec


    Current Configuration
    Option Configured Value
    Default PHP Version (.php files) 5
    PHP 5 Handler fcgi
    PHP 4 Handler none
    Apache suEXEC on
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    I suspect this is due to using FCGI, which was why I asked for the PHP handler. There are some bugs noted about graceful Apache restarts having issues with FCGI. Do you have this issue happen under another PHP handler? Additionally, are you showing any errors in /usr/local/apache/logs/error_log location when this happens?
     
  5. Takkero

    Takkero Member

    Joined:
    Oct 5, 2003
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Code:
    [Wed May 11 22:18:19 2011] [warn] [client 62.167.216.144] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5, referer: 
    [Wed May 11 22:18:19 2011] [error] [client 62.167.216.144] File does not exist: /home/ngdr/public_html/503.shtml, referer: 
    [Wed May 11 22:18:19 2011] [warn] [client 62.167.216.144] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5, referer: 
    [Wed May 11 22:18:19 2011] [error] [client 62.167.216.144] File does not exist: /home/ngdr/public_html/503.shtml, referer: 
    [Wed May 11 22:18:19 2011] [warn] [client 62.167.216.144] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5, referer: 
    [Wed May 11 22:18:19 2011] [error] [client 62.167.216.144] File does not exist: /home/ngdr/public_html/503.shtml, referer: 
    [Wed May 11 22:18:19 2011] [warn] [client 62.167.216.144] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5, referer: 

    what handler shall i use? suPHP? CGI?
     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    suPHP would be preferred over CGI as CGI is no more secure than suPHP and more difficult to configure. CGI is also approximately as slow to process requests. suPHP is the default handler on new cPanel installations.
     
  7. ikillbill

    ikillbill Well-Known Member

    Joined:
    Feb 18, 2008
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
Loading...

Share This Page