Re: bad httplib latency due to IPv6 use

2012-10-17 Thread Chris Angelico
On Thu, Oct 18, 2012 at 11:28 AM, Roy Smith wrote: > One likely path is to check in /etc/nsswitch.conf to see what data > sources the resolver should consult. On the box I'm using at the > moment, it says: > > hosts: files dns This is true on Linux, and presumably on various other Unice

Re: bad httplib latency due to IPv6 use

2012-10-17 Thread Roy Smith
In article , Ulrich Eckhardt wrote: > Some updates on the issue: > > The etc/hosts file contains the following lines: > > # localhost name resolution is handled within DNS itself. > # 127.0.0.1 localhost > # ::1 localhost > > As I understand it, those effectively

Re: bad httplib latency due to IPv6 use

2012-10-17 Thread Chris Angelico
On Wed, Oct 17, 2012 at 11:40 PM, Ulrich Eckhardt wrote: > Concerning the question whether a firewall blocks and unnecessarily delays > connection attempts to ::1, I haven't determined that yet. I'll ask our > admins here to verify whether that is the case. It would only be a software firewall on

Re: bad httplib latency due to IPv6 use

2012-10-17 Thread Ulrich Eckhardt
Some updates on the issue: The etc/hosts file contains the following lines: # localhost name resolution is handled within DNS itself. # 127.0.0.1 localhost # ::1 localhost As I understand it, those effectively mean that localhost is not resolved via this hosts fil

Re: bad httplib latency due to IPv6 use

2012-10-17 Thread Roy Smith
In article <1s42l9-9al@satorlaser.homedns.org>, Ulrich Eckhardt wrote: > Hi! > > I noticed yesterday that a single HTTP request to localhost takes > roughly 1s, regardless of the actually served data, which is way too > long. After some digging, I found that the problem lies in > socket.

Re: bad httplib latency due to IPv6 use

2012-10-17 Thread Laszlo Nagy
What I'm wondering is this: 1. The server only serves on IPv4, changing this to IPv6 would probably help. However, I wouldn't consider this a bug, or? I'd say it's a bug in your TCP/IP stack. An IP shouldn't take that long to figure out that it is not configured to connect to IPv6 addresses. I

Re: bad httplib latency due to IPv6 use

2012-10-17 Thread Chris Angelico
On Wed, Oct 17, 2012 at 8:37 PM, Hans Mulder wrote: > I have no experience with win7/64, but on earlier versions of Windows, > there's a file named "hosts", somewhere in a system directory. When > looking up an IP address, this file is consulted first. Removing the > ::1 from the entry for local

Re: bad httplib latency due to IPv6 use

2012-10-17 Thread Hans Mulder
On 17/10/12 09:55:13, Ulrich Eckhardt wrote: > Hi! > > I noticed yesterday that a single HTTP request to localhost takes > roughly 1s, regardless of the actually served data, which is way too > long. After some digging, I found that the problem lies in > socket.create_connection(), which first tri

bad httplib latency due to IPv6 use

2012-10-17 Thread Ulrich Eckhardt
Hi! I noticed yesterday that a single HTTP request to localhost takes roughly 1s, regardless of the actually served data, which is way too long. After some digging, I found that the problem lies in socket.create_connection(), which first tries the IPv6 ::1 and only then tries the IPv4 127.0.0