Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #56961 > unrolled thread
| Started by | Ervin Hegedüs <airween@gmail.com> |
|---|---|
| First post | 2013-10-17 15:55 +0200 |
| Last post | 2013-10-17 15:55 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: urllib2 timeout issue Ervin Hegedüs <airween@gmail.com> - 2013-10-17 15:55 +0200
| From | Ervin Hegedüs <airween@gmail.com> |
|---|---|
| Date | 2013-10-17 15:55 +0200 |
| Subject | Re: urllib2 timeout issue |
| Message-ID | <mailman.1159.1382018239.18130.python-list@python.org> |
Hello, On Thu, Oct 17, 2013 at 03:34:05PM +0200, Jérôme wrote: > Hi. > > Thank you all for your answers. > > -------------------------------------------------- > Context: > > The problem I want to address is the code being stuck too long when the > network is down. > > I'm working on a software gateway running on a Raspberry Pi, that forwards > data received through a radio link to the network. > > https://github.com/Jerome-github/oem_gateway > > This can be sending HTTP requests every 3 seconds, so a 10 secondes timeout > is an issue. > -------------------------------------------------- > > I was not at home when I wrote my last message. Now back home, I could try on > my own Debian Jessie machine (Python 2.7.5+) and I get the same results as > with the RaspberryPi (long timeout). So there seems to be something going on > with the router/modem. Has your router/modem any HTTP proxy feature? If yes, maybe the proxy gives the late answer. Anyway, if you don't have proxy, and the DNS error cames from local system, you can try to decrease it via resolv.conf: nameserver 1.2.3.4 options timeout:2 It's just an idea... but maybe... Note that the 2 seconds for DNS timeout in resolv.conf may sound crazy, because the _real_slow_ DNS answers will be timeouted for any application - just take a test with it. Cheers, Ervin
Back to top | Article view | comp.lang.python
csiph-web