mpapet has asked for the wisdom of the Perl Monks concerning the following question:
Occasionally the server has a high load and the script fails. I put sleep 2 in to help, which seems like it helps, but I still get a failures. I've tried intentionally killing tail.exe after use but it doesn't help. The code below runs in the eternal loop. The subroutine backticks_die just sends me an email.
@servergrep = `c:\\unixtools\\usr\\local\\wbin\\tail.exe -n 10 $line` or die backticks_die(); sleep 2; our $message = grep ( /accept Rejected. Max connection reached/i, @servergrep); if ($message) { print "found max connections /n "; }; #clear out @servergrep @servergrep=();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32 script dies under high load
by mjscott2702 (Pilgrim) on Jul 23, 2007 at 19:22 UTC | |
by mpapet (Novice) on Jul 24, 2007 at 21:37 UTC | |
by BrowserUk (Patriarch) on Jul 24, 2007 at 22:13 UTC | |
|
Re: Win32 script dies under high load
by Argel (Prior) on Jul 23, 2007 at 19:41 UTC |