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