-
-
Notifications
You must be signed in to change notification settings - Fork 73
Closed
saghul/pycares
#253Description
Hello! With the new version of aiodns we've noticed the following warnings:
Failed to create DNS resolver channel with automatic monitoring of resolver configuration changes. This usually means the system ran out of inotify watches. Falling back to socket state callback. Consider increasing the system inotify watch limit: Failed to initialize c-ares channel
Reproducer:
import asyncio, aiodns
async def main():
while True:
resolver = aiodns.DNSResolver()
await resolver.close()
asyncio.run(main())It seems that closing the resolver doesn't free inotify watches.
In general, the resolver should be created once per application. But we have a lot of legacy code, which creates aiohttp.ClientSession for a single request and then closes it, like this:
async with aiohttp.ClientSession() as session, session.get(...) as response:
...Each time, aiohttp creates a new resolver and then closes it.
CanD42, horpto and kewldan
Metadata
Metadata
Assignees
Labels
No labels