Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: WWW::Mechanize Timeout period

by jrsimmon (Hermit)
on Jul 27, 2009 at 16:05 UTC ( [id://783583]=note: print w/replies, xml ) Need Help??


in reply to WWW::Mechanize Timeout period

Looks like mech doesn't do anything special with the timeout, so you're just dealing with LWP::UserAgent. The first thing I'd check is whether you're actually getting the timeout set with your code. From the LWP doc:

$ua->timeout $ua->timeout( $secs ) Get/set the timeout value in seconds. The default timeout() value is 1 +80 seconds, i.e. 3 minutes.

Replies are listed 'Best First'.
Re^2: WWW::Mechanize Timeout period
by alexm (Chaplain) on Jul 27, 2009 at 22:54 UTC

    I've successfully tested that the timeout option used in WWW::Mechanize::new works as expected for me.

    DB<1> use WWW::Mechanize DB<2> $mech = WWW::Mechanize->new (timeout=>300) DB<3> x $mech->get ('http://192.168.1.77') Error GETing http://192.168.1.77: Can't connect to 192.168.1.77:80 (co +nnect: No route to host) at (eval 35)[/usr/share/perl/5.10/perl5db.pl +:638] line 2 DB<4> x $mech->timeout 0 300 DB<5> x $mech->timeout(1) 0 300 DB<6> x $mech->timeout 0 1 DB<7> x $mech->get ('http://192.168.1.77') Error GETing http://192.168.1.77: Can't connect to 192.168.1.77:80 (co +nnect: timeout) at (eval 40)[/usr/share/perl/5.10/perl5db.pl:638] lin +e 2

    Note the difference in error message reported.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://783583]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2025-02-07 15:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (94 votes). Check out past polls.