From: Nigel Gilbert Date: 2003-06-19T17:16:42+09:00 Subject: Re: TCP/IP protocol and Net::HTTP It consistently times out for me. The default timeout time is 60 seconds (set in net/http), and this is _much_ longer than doubleclick normally takes to respond (it could not serve ad banners if it normally responded so slowly). Here is what I obtain: irb(main):001:0> require 'net/http' => true irb(main):002:0> Net::HTTP.get_print 'ad.doubleclick.net', '/' TimeoutError: execution expired from /usr/local/lib/ruby/1.6/timeout.rb:37:in `connect' from /usr/local/lib/ruby/1.6/net/protocol.rb:467:in `timeout' from /usr/local/lib/ruby/1.6/net/protocol.rb:467:in `connect' from /usr/local/lib/ruby/1.6/net/protocol.rb:449:in `initialize' from /usr/local/lib/ruby/1.6/net/protocol.rb:149:in `new' from /usr/local/lib/ruby/1.6/net/protocol.rb:149:in `conn_socket' from /usr/local/lib/ruby/1.6/net/http.rb:499:in `do_start' from /usr/local/lib/ruby/1.6/net/protocol.rb:131:in `start' from /usr/local/lib/ruby/1.6/net/http.rb:458:in `get_print' from (irb):2 irb(main):003:0> Perhaps there is something weird about my set up (MacOSX 10.2.6, ruby 1.6.8), although it doesn't manifest itself in any other way. Can anyone else report success or failure with this? Nigel On Thursday, June 19, 2003, at 09:00 AM, stefano wrote: > On Thu, 19 Jun 2003 03:24:30 +0900, Nigel Gilbert wrote: > >> However, 'ad.doubleclick.net' is an exception. The code; >> Net::HTTP.get_print 'ad.doubleclick.net', '/' >> times out. > > It doesn't time out for me (just tried). I noticed, however, > that this server is sometimes a bit slow to respond. What > is the default timeout value for Net::HTTP? > > -- > ste > > > ________________________________________________________________________ __ Professor Nigel Gilbert, FREng, AcSS, Pro Vice-Chancellor and Professor of Sociology, University of Surrey, Guildford GU2 7XH, UK. +44 (0)1483 689173