I’ve been running a script against our web server that continually reads in
the home page and dumps any errors to file.
Overnight I got 5 errors – 2 like this:
socket read timeout (60 sec)
…and 3 like this:
A connection attempt failed because the connected party
did not properly respond after a period of time, or
established connection failed because connected host
has failed to respond. - “connect(2)”
Same script:
def ping
h = Net::HTTP.new(‘www.x.com’, 80)
h.open_timeout = 60
h.read_timeout = 60
resp = h.get2(’/index.html’, nil ) # get2 won’t raise an exception
[resp.code, resp.message, resp.body[0…500]]
end
… I understand a read timeout of 60, but why aren’t all my errors like
that? What causes the second error to occur, because it essentially says it
was a timeout, right?
Chris
http://clabs.org