[Twisted-Python] Twisted Names too many open files...resolv.conf

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Thu Jun 17 21:41:54 EDT 2010

On 12:36 am, jasonjwwilliams at 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 

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 


More information about the Twisted-Python mailing list