On Jul 19, 2011, at 8:36 AM, Reza Lotun wrote:

Anyway, I suppose the real lesson is the non-caching of gethostbyname calls. Not being a DNS guru, I had no idea calls weren't cached locally. Let that be a lesson, I guess.

You were probably confused by the fact that glibc caches /etc/resolv.conf in each process and doesn't always reload it when it should.  Depending on what patches your platform has decided to include in its libc, you may or may not have to call res_init() to get an up-to-date resolv.conf.  It doesn't ever cache the results of name lookups themselves though, that would lead to all kinds of mayhem.

False alarm or not, thanks for testing trunk versions of Twisted against your application. It's great to get these kinds of issues investigated _before_ a release :).