Apache creashing randomly, getting annoying

DragonFlu

Member
Feb 12, 2004
7
0
151
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.
 
Last edited:

mohit

Well-Known Member
Jul 12, 2005
553
0
166
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
 

DragonFlu

Member
Feb 12, 2004
7
0
151
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
 
Last edited:

DragonFlu

Member
Feb 12, 2004
7
0
151
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.
 

mohit

Well-Known Member
Jul 12, 2005
553
0
166
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
 
Last edited:

HostMerit

Well-Known Member
Oct 24, 2004
164
0
166
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:

[email protected] [/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.