[RFC] Cache DNS as long as the pycurl Transport is active
John Arbash Meinel
john at arbash-meinel.com
Mon Aug 28 15:42:22 BST 2006
Pycurl defaults to caching DNS values for 60s. Which means that after we
have connected to a machine, if we stay connected for >60s, it will make
another DNS request.
While I thought this was reasonable, it seems on someones machine (it
might just be cygwin and cygwin's version of pycurl), after the cache
has expired, it seems to fail to connect.
I thought there was a bug open on this, but I can't seem to find it now.
Anway, the attached patch changes our DNS cache level, so that values
stay cached as long as the Transport is open.
I think the person who reported the bug was using bzrlib directly,
because he was keeping Transport objects open and unused for a while,
rather than bzr who only keeps them around for as long as it is connected.
Anyway, I'm probably -0 on this patch, especially for really long lived
transports, it is better to ping DNS again. But I think it would have
fixed their problem, so I wanted to get it out in the open.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pycurl-dns-cache.patch
Type: text/x-patch
Size: 1471 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060828/fb714e6b/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060828/fb714e6b/attachment.pgp
More information about the bazaar
mailing list