trell has asked for the wisdom of the Perl Monks concerning the following question:

I'm in need of some wisdom!

I am in need of a script i can run 24x7 every 5 minutes that will preform a socket connect to a web site check the header and go back to sleep. I have written this, however this is the bad part. We have a product setting on IIS that has a serious memory leak, and causes IIS to go into a failed state (does not respond to request) When this happens my script fails to work, because it is not able to complet the connect due to not getting a timeout or a sigalarm.

We have tried using Threads and get this error (This perl was built for "ithreads", which currently does not support Thread.pm)

We have also tired using the IO::Select pm and even writting our own timers, all to no avail.

Please any help you can offer would be greatly appreciated.

Trell

  • Comment on SigAlarm or Timeout on WINNT for a Socket Connect

Replies are listed 'Best First'.
Re: SigAlarm or Timeout on WINNT for a Socket Connect
by Anonymous Monk on Jul 03, 2001 at 05:03 UTC
    LWP::UserAgent supports a timeout:
    $ua->timeout($timeout_seconds);