my httpd crash always each day

duke27

Verified User
Joined
Jul 9, 2004
Messages
8
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???
 
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:

Code:
# 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:
Code:
  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..
 
what does that extra line do exactly? I'm having some issues w/ apache segfaulting quite a bit, and running my load sky high
 
kill nicely tells a process to exit.

kill -9 just goes ahead and kills it.

Jeff
 
lnguyen said:
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
 
Back
Top