<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jul 19, 2011, at 8:36 AM, Reza Lotun wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Menlo; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div>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.</div></span></blockquote><br></div><div>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. &nbsp;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. &nbsp;It doesn't ever cache the results of name lookups themselves though, that would lead to all kinds of mayhem.</div><div><br></div><div>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 :).</div><div><br></div><div>-glyph</div><div><br></div></body></html>