Having worked in environments where servers get rebooted at odd times for 
unknown reasons I'll ask the dumb question
What happens to the other processes that are running when the server is 
rebooted?
What happens to the logs?
I think you may have what Leon called a 'resource allocation issue' that may 
not be corrected until you actually look at the code
to determine who or what is grabbing all of the file handles (and not closing 
them)

M-
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



----- Original Message ----- 
From: "Mladen Adamovic" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Monday, September 25, 2006 4:51 AM
Subject: Re: static objects, server.xml and preventing running out of available 
file descriptors


>I prepared one bash script which aim is to reboot the computer if its 
> web server is down for approx. 30 minutes.
> I think that bash script might be useful for others on this list, so I'm 
> posting it here.
> But, I'm not sure what is the best way to run that script.
> I'm using Suse 9.3 on the server. Should I make it runnable in 
> /etc/init.d as daemon or there is some easier way?
> 
> Script's code:
> 
> #!/bin/bash
> #bash script which reboots the computer when web server is down for 
> approx. 30 minutes
> serverFailure=0
> while [ true ]
> do
>    wget -t 1 -T 30 -q www.mysite.com
> 
>    if [ $? != 0 ]; then
>        #echo 'server is down!';
>        serverFailure=$(($serverFailure + 1));
>        if [ $serverFailure -gt 3 ]; then
>               echo 'too many server failures... going to reboot' >> 
> ~/reboot.log ;
>            date >> ~/reboot.log
>            reboot
>            
>        fi
>    else
>        echo 'server is up!';
>        serverFailure=0
>    fi
>    #echo 'ServerFailure='$serverFailure;
>    sleep 7m
> done
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

Reply via email to