PDA

View Full Version : my httpd crash always each day


duke27
07-09-2004, 12:35 AM
my httpd crash always each day

sometime at around 20h pm
and sometimes at around midnight....


what i need to do???

i built alllllllll

and its did it again....

log :

[Thu Jul 8 20:13:45 2004] [notice] child pid 31459 exit signal Segmentation fault (11)
[Thu Jul 8 20:13:45 2004] [notice] child pid 31460 exit signal Segmentation fault (11)
[Thu Jul 8 20:13:45 2004] [notice] child pid 31461 exit signal Segmentation fault (11)
[Thu Jul 8 20:13:45 2004] [notice] child pid 31462 exit signal Segmentation fault (11)
[Thu Jul 8 20:13:45 2004] [notice] child pid 31463 exit signal Segmentation fault (11)
[Thu Jul 8 20:13:45 2004] [notice] child pid 31464 exit signal Segmentation fault (11)
[Thu Jul 8 20:13:45 2004] [notice] child pid 31465 exit signal Segmentation fault (11)
[Thu Jul 8 20:13:45 2004] [notice] child pid 31468 exit signal Segmentation fault (11)
[Thu Jul 8 20:13:46 2004] [notice] child pid 31474 exit signal Segmentation fault (11)



OR

[Fri Jul 9 00:15:16 2004] [crit] (98)Address already in use: make_sock: could not bind to port 8090


what can i do serious???

Wunk
07-13-2004, 04:45 AM
We have this on some DA servers too
There's a very simple solution really..

Open up /etc/init.d/httpd in your favorite editor, and look up the part:


# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $httpd
RETVAL=$?
;;
restart)
stop
start
;;
condrestart)


And add 1 line in the restart part:

restart)
stop
ps aux | grep httpd | grep -v restart | grep -v grep | awk '{print "kill -9 " $2}' | sh
start
;;


If apache fails to stop, it'll forcibly be killed with a kill -9 this way..

lnguyen
10-27-2004, 10:56 AM
what does that extra line do exactly? I'm having some issues w/ apache segfaulting quite a bit, and running my load sky high

jlasman
10-27-2004, 01:32 PM
kill nicely tells a process to exit.

kill -9 just goes ahead and kills it.

Jeff

Wunk
10-28-2004, 02:06 AM
Originally posted by lnguyen
what does that extra line do exactly? I'm having some issues w/ apache segfaulting quite a bit, and running my load sky high

The normal script will gracefully ask for apache to stop and shut down properly, after that has been done that line will look if there's more apache processes being stuck and thus not listening to a request to stop, and if so kill them the hard way..

Plain translated:
get the process list
only show httpd processes
filter out the init.d/httpd restart line
print the processnumbers in the 2nd ps column of the remaining lines and send a kill -9 to those processnumbers

jmstacey
10-28-2004, 08:25 PM
This also might be of some use: http://help.directadmin.com/item.php?id=31