Re: $ua->Timeout(n) doesnt
Gisle Aas (gisle@aas.no)
12 Oct 1999 19:43:00 +0200
jb@dslreports.com writes:
> I've done my due diligence with deja, www.google.com/linux and this
> list archive, and I cant find an answer.
>
> Redhat 6.0 (two different boxes, one with a freshly recompiled newer
> kernel), exhibit the above mentioned problem.
>
> The trace shows the alarm(n), the connect(), the alarm goes off, connect
> returns ERESTARTSYS
> sigreturn(), connect() starts up again, to time out ages later at
> the tcp stack timeout value i suppose.
>
> If you point $ua->request at a downed IP, or a malfunctioning web server,
> your process is hung up on that for minutes.
> What can I do to get around this.. its driving me crazy, i have to write
> hack wrappers for some scripts that cannot be allowed to hang like this..
> I am kind of tempted to change the tcp config to reduce connect timeouts
> to 10 seconds, but I'm afraid of unforseen consequences as that would
> be applied to everything?
Your problem should be fixable by upgrading your IO modules to version
1.20. Here IO::Socket will not use alarm() to timeout connect(), but
will instead make the socket non-blocking and then look for
EINPROGRESS return from connect().
Regards,
Gisle