Re: Timeout exceeded on Parallel User Agent

Marc Langheinrich (marclang@cs.washington.edu)
Tue, 13 Jul 1999 08:41:07 +0900


Jon,

timeouts are a longstanding problem with both pua and lwp (which pua is
based on). This is because it relies on the operating system's "select"
call (or better: Perl's interface to it) to handle the timeouts, and
apparently this doesn't always work as it should. There has been quite a
lot of traffic on the lwp-list recently about this, and other than setting
a timeout yourself using "alarm" I don't have a good solution. It should be
possible to enclose the "select" call in the code with an "eval" and a
setting a corresponding "alarm", so feel free to change the source code as
you see fit...

-marc


> Hi,
> 
> I'm using the Parallel User Agent module in a perl script that polls several
> sites (simultaneously) for bits of information. I have set a maximum timeout
> value (and even pass it as the wait() parameter to be thorough) for the
> ParallelUA at 120 seconds; however, I find that the ParallelUA->wait() call
> often takes longer than 200 seconds when one of the sites I'm polling is not
> responding to HTTP requests (site partially down). I had assumed that the
> ParallelUA truly made its requests in parallel, but this may not be the
> case. If not, I could see the timeout occurring from an open socket delay
> when a site does not respond, possibly stalling the ParallelUA module at
> that point past the 120 second maximum wait parameter I pass. Has anyone
> else experienced this problem and are there any suggestions for its
> solution?
> 
> Thanks in advance,
> Jonathan Siegel
> jsiegel@bigfoot.com

-- 
Marc Langheinrich
marclang@cs.washington.edu