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 creashing randomly, getting annoying

Discussion in 'EasyApache' started by DragonFlu, Jan 19, 2006.

  1. DragonFlu

    DragonFlu Member

    Joined:
    Feb 12, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Apache crashing randomly, getting annoying

    I've been trying for the past few weeks to figure out why apache keeps crashing at random times, whm keeps emailing me about it that it restarted apache, sometimes 2-3 times a day, the only thing I see in the error logs is:

    And no the namevirtualhost has nothing to do with the crashing :)

    [Thu Jan 19 02:03:57 2006] [error] [client 66.249.64.14] File does not exist: /home/acmeweb/public_html/support
    [Thu Jan 19 02:15:41 2006] [warn] NameVirtualHost 66.98.157.46:80 has no VirtualHosts
    [Thu Jan 19 02:15:41 2006] [warn] pid file /usr/local/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
    [Thu Jan 19 02:15:42 2006] [notice] Apache/1.3.34 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.1 FrontPage/5.0.2.2635 mod_ssl/2.8.25 OpenSSL/0.9.6b configured -- resuming normal operations
    [Thu Jan 19 02:15:42 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)
    [Thu Jan 19 02:15:42 2006] [notice] Accept mutex: sysvsem (Default: sysvsem)

    Someone had installed MODSECURITY about the same time it started crashing, I've uninstalled modsecurity etc, but the server still crashes randomly. Any help on this would be appreciated.

    Last 10 Crash Date/Times:

    1/13/2006 12:29 PM
    1/13/2006 02:53 PM
    1/14/2006 01:16 AM
    1/15/2006 02:51 PM
    1/16/2006 04:26 AM
    1/17/2006 03:47 AM
    1/17/2006 02:17 PM
    1/17/2006 06:29 PM
    1/17/2006 09:34 PM
    1/19/2006 02:15 AM

    Thanks.
     
    #1 DragonFlu, Jan 19, 2006
    Last edited: Jan 19, 2006
  2. gundari

    gundari Registered

    Joined:
    Apr 14, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Santa Fe, Argentina
    If your server was crashed and you did a remote reset, maybe some apache files are corrupted, try reinstalling apache from scratch.

    If apache still crashing, think about a memmory problem :(
     
  3. mohit

    mohit Well-Known Member

    Joined:
    Jul 12, 2005
    Messages:
    553
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Sticky On Internet
    Same here pal

    seems like you posted what i was trying to do.

    Exactly the same problem after upcp
    currently running "WHM 10.8.0 cPanel 10.8.1-R113"

    And it runs smoothly and few minutes later either it restarts automagicly or i have to restart it manually.

    Did everything to keep it stable but no use, Admin upgraded apache to 1.3.34 but that also of no use.

    any Solution would be appreciated.

    Please give me a solution.

    regards,
    mohit
     
  4. DragonFlu

    DragonFlu Member

    Joined:
    Feb 12, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    The machine itself is not crashing, I've tried recompiling apache several times, no luck, it's not a memory issue, the whm version

    I've tried using stable release same thing: Cpanel 10.8.1-S114
    I've tried using current release same thing: Cpanel 10.8.1-C112
     
    #4 DragonFlu, Jan 19, 2006
    Last edited: Jan 19, 2006
  5. gundari

    gundari Registered

    Joined:
    Apr 14, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Santa Fe, Argentina
    DragonFlu, I can try to fix the problem, but need to take a look.

    PM if you want.
     
  6. DragonFlu

    DragonFlu Member

    Joined:
    Feb 12, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Sorry, but unless you are a cpanel staff member I wont allow access to this machine. This machine serves as our main billing machine, etc, no one has access to it. Especially since I don't know who you are, etc. Too many people say things like that just wanting to get access to a machine for malicious purposes.
     
  7. mohit

    mohit Well-Known Member

    Joined:
    Jul 12, 2005
    Messages:
    553
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Sticky On Internet
    we tweaked apache several times, even turned off the "keep Alive"
    but seems strange issue,
    Memory usage keeps on climbing and then Apache goes off.........

    Happens atleast 20 times a day

    Any luck ???

    :-(
    mohit
     
    #7 mohit, Jan 19, 2006
    Last edited: Jan 19, 2006
  8. gundari

    gundari Registered

    Joined:
    Apr 14, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Santa Fe, Argentina
    I understand DragonFlu. I just offering my SysAdmin services ;)

    I will post any ideas about your problem if come something to my mind.
     
  9. gundari

    gundari Registered

    Joined:
    Apr 14, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Santa Fe, Argentina
    mohit, maybe a php script eating all your resources? Look at new customers files or something.
     
  10. HostMerit

    HostMerit Well-Known Member

    Joined:
    Oct 24, 2004
    Messages:
    160
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    New Jersey, USA
    cPanel Access Level:
    DataCenter Provider
    Try clearing the main logs (Wont kill any stats)

    Code:
    killall -9 httpd;httpd stop;echo "" > /usr/local/apache/logs/access_log;echo "" > /usr/local/apache/logs/suexec_log;echo "" > /usr/local/apache/logs/error_log;httpd startssl
    

    Another nice trick I do alot to see whos using up all of the Apache processes is:

    Code:
    cd /proc;watch " ls -al */cwd|grep public_html"
    
    Make sure to maximize your SSH screen, every 2 seconds this will show every apache process, and the home directory it's being sprouted from.

    Say you see too many processes in /home/tamra/public_html - To see how many Apache processes they are using, make sure you're still in the /proc dir, and run:

    Code:
    ls -al */cwd|grep tamra|wc -l
    
    It will return:

    root@relapse [/proc]# ls -al */cwd|grep tamra|wc -l
    32


    That user has 32 processes, assuming tamra is the rogue user you suspect. If its over 25-30 more or less whenever you check it, I would suggest suspending the user, restarting apache and MySQL, and checking if your load changes drastically.

    Also, you can use a small feature in WHM called 'Limit Apache Memory Usage' - I believe it's called that, this will set a limit on the max memory one child process can use.
     
Loading...

Share This Page