Working on an auto-retart script for this server since it seems to be going down a lot lately.
Once working, if the server hangs or crashes, the script will kill any lingering process if there and then restart the server. The most the server would then be down is like 3 minutes.
More as I figure it out.
T
Basically, this thing will query the server to see if it is running. Since the query will always result in a timeout when the server is in map vote, and the map vote is 90 seconds long (1.5 minutes) and we need to allow a bit of time for whatever, it will have to be a 3 minute value.
T
Set-up a cron job to poll the process itself every 60 seconds. If the process disappears
off the list, cron will restart the process. That way you aren't having to worry about mapvotes
and queries. Have a good one.
~Johnny Jones
3 minutes or even 5 is no big deal. Seems like that would work ok.
___-SM-___
Draco wrote: Set-up a cron job to poll the process itself every 60 seconds. If the process disappears
off the list, cron will restart the process. That way you aren't having to worry about mapvotes
and queries. Have a good one.
~Johnny Jones
Some hosts don't let you use cron jobs.
".::/3I§ON wrote: [quote=Draco]Set-up a cron job to poll the process itself every 60 seconds. If the process disappears
off the list, cron will restart the process. That way you aren't having to worry about mapvotes
and queries. Have a good one.
~Johnny Jones
Some hosts don't let you use cron jobs.
That is completely true but DOU controls its dedicated box to run all of its servers on so a cron job would be no issue at all to run.
~Johnny Jones
After some debugging, I have altered the q2monitor script I use for my Q2 servers to start and run the UT sniper server. The new script pings the UT server every 10 secs and if it fails to respond to 9 consecutive pings it declares it down and kills any zombies and does a restart. The advantage of this method is that it detects a hung server, not just an existing process.
If the map vote timeout is an issue and it really doesn't respond to pings during that interval we can increase the timeout in the monitor. Let me know how it goes. Tommy still has to test it and prove it will restart the server when needed.
14:37 EST: I've watched the server through several map changes now with a 90 second restart threshold and the monitor has not attempted to restart the server unnecessarily. Either it's working great or it can't reset it. Still waiting to see a server crash.
Do an adminlogin and then an admin quit in the console. It'll kill the server and you'll see if the script is working. I gotta say it's a brilliant idea when you describe the hung-up server, Wabbit. I have to say that going from Linux to windows, the only advantage it has is that the start-up scripts actually work and the server never stays down more than 20 seconds, otherwise I'd be bribing you with beer, cash, and women to get this from you. Have a good one.
~Johnny Jones
Yes to all three. You now have a working auto-restart for UT on Linux. Send the check, I like Corona (I have my own lemons) and young and eager women of just about any size. 🙂
QwazyWabbit wrote: women of just about any size. 🙂
even I have limits man :eek2:
Depends on whether you are talking about bra size or a pair of double-wide motor homes. Yikes!
".::/3I§ON wrote: [quote=QwazyWabbit] women of just about any size. 🙂
even I have limits man :eek2:
LMFAO!
"The buddy system is essential to your survival; it gives the enemy somebody else to shoot at!!"