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 ran out of memory...

Discussion in 'EasyApache' started by cyon, Jul 23, 2003.

  1. cyon

    cyon Well-Known Member
    PartnerNOC

    Joined:
    Jan 15, 2003
    Messages:
    320
    Likes Received:
    0
    Trophy Points:
    16
    hi,

    apache went down and when I want to restart it, I get this:

    Code:
    Jul 21 16:28:04 server1 kernel: Out of Memory: Killed process 7225 (httpd).
    Jul 21 16:33:31 server1 kernel: Out of Memory: Killed process 5522 (httpd).
    Jul 21 16:45:35 server1 kernel: Out of Memory: Killed process 4974 (httpd).
    Jul 21 16:45:35 server1 kernel: Out of Memory: Killed process 4980 (httpd).
    Jul 21 16:45:35 server1 kernel: Out of Memory: Killed process 4980 (httpd).
    Jul 21 16:45:35 server1 kernel: Out of Memory: Killed process 3917 (httpd).
    Jul 21 16:45:35 server1 kernel: Out of Memory: Killed process 7590 (httpd).
    Jul 21 16:45:35 server1 kernel: Out of Memory: Killed process 7590 (httpd).
    Jul 21 16:45:35 server1 kernel: Out of Memory: Killed process 4973 (httpd). 
    Jul 21 16:45:35 server1 kernel: Out of Memory: Killed process 4979 (httpd). 
    Jul 21 16:45:35 server1 kernel: Out of Memory: Killed process 3919 (httpd). 
    Jul 21 16:45:35 server1 kernel: Out of Memory: Killed process 4872 (httpd). 
    Jul 21 16:46:12 server1 kernel: Out of Memory: Killed process 4978 (httpd). 
    Jul 21 16:46:32 server1 kernel: Out of Memory: Killed process 7561 (httpd). 
    Jul 21 16:47:59 server1 kernel: Out of Memory: Killed process 7609 (httpd). 
    Jul 21 16:47:59 server1 kernel: Out of Memory: Killed process 3922 (httpd). 
    Jul 21 16:47:59 server1 kernel: Out of Memory: Killed process 3920 (httpd). 
    Jul 21 16:48:00 server1 kernel: Out of Memory: Killed process 5002 (httpd). 
    Jul 21 16:48:00 server1 kernel: Out of Memory: Killed process 5011 (httpd). 
    Jul 21 16:48:00 server1 kernel: Out of Memory: Killed process 3918 (httpd). 
    Jul 21 16:48:06 server1 kernel: Out of Memory: Killed process 7959 (httpd). 
    Jul 21 17:39:28 server1 kernel: Out of Memory: Killed process 8762 (httpd). 
    Jul 21 18:28:31 server1 kernel: Out of Memory: Killed process 8773 (httpd). 
    Jul 21 18:29:49 server1 kernel: Out of Memory: Killed process 8806 (httpd). 
    Jul 21 18:51:42 server1 kernel: Out of Memory: Killed process 8760 (httpd). 
    Jul 21 18:55:12 server1 kernel: Out of Memory: Killed process 8790 (httpd). 
    httpd has failed, please contact the sysadmin. 
    
    any ideas?
    I was running 6.4.2.. then I updated to to 7.2.1 S85 and recompiled apache.. doesn't help..
     
    #1 cyon, Jul 23, 2003
    Last edited: Jul 23, 2003
  2. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    36
    Sounds like you either need to limit the amount of memory an apache process can consume and/or add more RAM to your rig.

    cPanel.net Support Ticket Number:
     
  3. cyon

    cyon Well-Known Member
    PartnerNOC

    Joined:
    Jan 15, 2003
    Messages:
    320
    Likes Received:
    0
    Trophy Points:
    16
    we're planing on adding more ram.

    in the meantime, limiting the amount apache may use sounds like a good idea.
    where can this be done?

    we restarted the server a day ago, and in the process the ram must have been cleared.
    so its kind of weird that the ram was consumed within one day.

    is there any way to clear the ram manually?

    cPanel.net Support Ticket Number:
     
  4. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    36
    Add the following to the top of your httpd.conf file:

    RLimitMEM 23178922
    RLimitCPU 240

    Save, close & restart Apache.

    Stopping & restarting Apache may clear out some ram, however processes are known to continue to inhabit ram even though processes are long dead. This all depends on your Apache version, modules running, etc.

    cPanel.net Support Ticket Number:
     
  5. cyon

    cyon Well-Known Member
    PartnerNOC

    Joined:
    Jan 15, 2003
    Messages:
    320
    Likes Received:
    0
    Trophy Points:
    16
    we tried that:

    still doesn't work. after an apache restart I still get the same error message.

    thanks anyway.

    cPanel.net Support Ticket Number:
     
  6. cyon

    cyon Well-Known Member
    PartnerNOC

    Joined:
    Jan 15, 2003
    Messages:
    320
    Likes Received:
    0
    Trophy Points:
    16
    I found this in my error_log:

    any ideas what this could be

    cPanel.net Support Ticket Number:
     
    #6 cyon, Jul 23, 2003
    Last edited: Jul 23, 2003
  7. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    36
    Sounds like a stale apache process:

    killall -9 httpd (execute that 4 or 5 times)
    service httpd start

    cPanel.net Support Ticket Number:
     
  8. cyon

    cyon Well-Known Member
    PartnerNOC

    Joined:
    Jan 15, 2003
    Messages:
    320
    Likes Received:
    0
    Trophy Points:
    16
    root@server1 [~]# killall -9 httpd
    httpd: no process killed

    ..still not working :( I have no idea what the problem could be..

    cPanel.net Support Ticket Number:
     
  9. cyon

    cyon Well-Known Member
    PartnerNOC

    Joined:
    Jan 15, 2003
    Messages:
    320
    Likes Received:
    0
    Trophy Points:
    16
    I found this in another thread:

    next reply:

    my question: how to kill that processes?

    cPanel.net Support Ticket Number:
     
  10. cyon

    cyon Well-Known Member
    PartnerNOC

    Joined:
    Jan 15, 2003
    Messages:
    320
    Likes Received:
    0
    Trophy Points:
    16
    I solved it.

    I typed: netstat -anp | grep 443

    result: tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 29766/sc_serv

    then: kill -9 29766

    and finally: serice httpd start

    I really don't know what the problem was but it works now.. :)
    thanks very much for your fast help, ciphervendor!

    dave.

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page