Hi Jean-Paul, As usual you're very right on more than one front:
1.) Using Resolver() directly is exactly the behavior we wanted. 2.) Running out of file descriptors was not because of the resolv.conf. #2 was because this box had an ancient version of Twisted (2.5.0) that never stopped the Resolvers we were instantiating. I noticed it because trying to call resolver.factory.doStop() did nothing. Upgrading to Twisted 10.0.0 on the box fixed it, and the used FD count is down from ~1000 to hovering around 50. Thank you for your help. -J On Thu, Jun 17, 2010 at 7:41 PM, <exar...@twistedmatrix.com> wrote: > On 12:36 am, jasonjwwilli...@gmail.com wrote: >>Hi Guys, >> >>Is there anyway to prevent twisted.names.client.createResolver() from >>creating a resolvconf resolver, when servers= is passed? >> >>The use here doesn't need the resolv.conf resolvers (and actually >>really doesn't want them). What appears to be occurring is that >>repeated use of createResolver() exhausts the number of allowed open >>files because resolv.conf is never closed: >> >>exceptions.IOError: [Errno 24] Too many open files: '/etc/resolv.conf' > > This doesn't mean resolv.conf is never closed. It just means you've > already run into your open file limit when something tried to open > resolv.conf. > > You didn't mention which version of Twisted you're using. Perhaps > you're running in to #970 (fixed in 10.0). > > But if you just want to use a particular server, then maybe you want to > instantiate twisted.names.client.Resolver directly, rather than calling > createResolver. > > Jean-Paul > > _______________________________________________ > Twisted-Python mailing list > Twisted-Python@twistedmatrix.com > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python > _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python