mopemope/meinheld

dnspython not send request with meinheld

lchabert opened this issue · 0 comments

Hello,

I have noticed an error when i use dnspython in django app, using meinheld backend of circus. My app use python 3.4.

My django app is lauching DNS request to check some parameters provided by users, if DNS is not correctly configured, an error is shown to users.

The following launch DNS request:

        resolver = dns.resolver.Resolver()
        resolver.nameservers = [self._get_dnshost()]
        resolver.timeout = 3
        resolver.lifetime = 3

        try:
            answers = resolver.query(self.sda.enum_format, 'NAPTR')
        except dns.exception.Timeout as e:
            raise PdnsDnsError(str(e))
        except dns.resolver.NXDOMAIN as e:
            raise PdnsDnsError(str(e))

Then, i run my app using this command:

chaussette --backend meinheld voxisdas.wsgi.application --port 8000 --host 0.0.0.0

And a dns.exception.Timeout is raised.

Do you have any clue about this error ? No DNS request is sent to my DNS server.
If i run my app with waitress for example, no error is raised. All queries are OK.

Thanks in advance.