On Jul 11, 2006, at 3:41 PM, Div Shekhar wrote:
Hi,
I've been using web2 for WSGI apps for a few months, and it's been
working fine. However, I did run into one bug this week:
web2 does a reverse dns lookup of the client ip address, and in the
twisted reactor thread, no less! When the dns server is unreachable,
this delays that http request and blocks twisted as well.
I'm planning to solve this by commenting out line 490 in
twisted/web2/channel/http.py:
host.host = _cachedGetHostByAddr(host.host)
I'd recommend that this lookup be moved to wsgi thread and/or be
turned off by default. Just wanted to check - am I missing something?
You're missing that it's looking up the _server_ hostname based on
the _server_ ip address. Therefore, it can only blocks on the dns
server once per server IP address.
James
_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web