From: Bill E. <bi...@rf...> - 2002-05-07 13:42:58
|
Fine, but can't you throw this in inittab as: wk:2345:respawn:/etc/rc.d/init.d/webkit restart so it restarts immediately instead of waiting up to 20 minutes? Costas Malamas wrote: > What follows is a hack, a kludge, a miserable excuse for a solution, but > it works. I have this running on a cronjob every 20mins or so... RedHat > Linux or relatives: > > -8<-------------------------------------------------------------------- > #!/bin/ksh > > # > # Configuration > # > ERRORFILE=/path/to/apache/error.log > FATALMSG="Connection refused: error transacting with app server -- > giving up. > > # > # Restart the app server (Linux only) > # > if [[ "$(grep "$FATALMSG" $ERRORFILE)" != "" ]]; then > > mail -s "FATAL Apache Error" yo...@em... <$ERRORFILE > > if [[ $(whoami) != "root" ]]; then > echo "!!! You have to be root to run this script!" > exit > fi > /etc/rc.d/init.d/webkit restart >/dev/null 2>&1 > > rm $ERRORFILE > touch $ERRORFILE > fi > -8<-------------------------------------------------------------------- > > C. > > > >> From: Bill Eldridge <bi...@rf...> >> To: Frank Barknecht <bar...@ph...> >> CC: "'web...@li...'" >> <web...@li...> >> Subject: Re: [Webware-discuss] Restarting AppServer automatically >> Date: Tue, 07 May 2002 13:02:02 +0200 >> >> Frank Barknecht wrote: >> >>> Hi all, >>> >>> my AppServer process died, and I didn't recognize this for one or two >>> days. How do you guys make sure, the AppServer doesn't die, or if >>> it dies, that you get to know it or that it gets restarted >>> automatically? >>> >>> Ciao, >> >> >> You can try putting an entry in your inittab >> for it with the action "respawn". Haven't done >> this myself, but I think it's allowed. >> >> Of course it's nice to know why AppServer is >> dying in the first place, but you can track that >> elsewhere. >> >> -- >> Bill Eldridge >> Radio Free Asia >> bi...@rf... >> >> >> >> _______________________________________________________________ >> >> Have big pipes? SourceForge.net is looking for download mirrors. We >> supply >> the hardware. You get the recognition. Email Us: >> ban...@so... >> _______________________________________________ >> Webware-discuss mailing list >> Web...@li... >> https://lists.sourceforge.net/lists/listinfo/webware-discuss > > > > _________________________________________________________________ > Send and receive Hotmail on your mobile device: http://mobile.msn.com > > > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download mirrors. We supply > the hardware. You get the recognition. Email Us: ban...@so... > _______________________________________________ > Webware-discuss mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webware-discuss -- Bill Eldridge Radio Free Asia bi...@rf... |