Hi, I already have the script in monitoring, so it restarts it, I just get mad from all the warnings that the daemon crashes.
The code you wrote, can I just add it *any ware* in the file, or do I need to replace something? Cheers, -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Serge Baranov Sent: Monday, June 23, 2008 8:38 PM To: Half-Life dedicated Win32 server mailing list Subject: Re: [hlds] [hlds_linux] HLStastX usage Hello Saint, Mine is just a hack against MySQL inactivity timeouts (HLstats.plib): sub doQuery { my ($query, $callref) = @_; if(!$db_conn->ping()) { $db_conn = DBI->connect("DBI:mysql:$db_name:$db_host", $db_user, $db_pass) or die ("\nCan't connect to MySQL database '$db_name' on '$db_host'\n" . "Server error: $DBI::errstr\n"); } my $result = $db_conn->prepare($query) or die("Unable to prepare query:\n$query\n$DBI::errstr\n$callref"); $result->execute or die("Unable to execute query:\n$query\n$DBI::errstr\n$callref"); return $result; } Another workaround would be removing "or die" part, thus just ignoring the database failures instead of terminating the script. You can also write a watchdog which will check if the script is running from cron every X minutes and restart it if it crashed. Monday, June 23, 2008, 10:19:06 PM, you wrote: S> Ah, now I finally know what keeps crashing our HLstatsX daemon. This might S> very well be what you say below here. S> I'd be interested in a solution for this aswell! -- Best regards, Serge _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds

