urllib2 timeout issue
Tobiah
toby at tobiah.org
Wed Oct 16 12:06:29 EDT 2013
>> If run on my Debian Wheezy computer, or on my Debian Squeeze server,
>> the answer is instantaneous :
>>
>> [...]
>> urllib2.URLError: <urlopen error [Errno -2] Name or service not known>
>>
>> When run on my Raspberry Pi with Raspian Wheezy, the answer is
>> identical but it takes 10 seconds.
What happens when you use ping to resolve that address. Do you get
the same results? If so, I'd say you have a DNS problem. Maybe
you have two DNS servers listed in /etc/resolv.conf or similar, and
the first one is unavailable, so it takes 10 seconds to fail over
to the second working server.
Tobiah
More information about the Python-list
mailing list