Skip to content

inotify leaks #191

@justtempusername

Description

@justtempusername

Still seeing Failed to create DNS resolver channel… spam on aiodns== 3.5.0 with pycares 4.10.0

After upgrading from aiodns==3.2.0/aiohttp==3.11.18 to aiodns==3.5.0 + aiohttp==3.12.15 + pycares==4.10.0, logs fill with:
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

Environment:

Ubuntu 22.04.5 LTS, Python 3.13.1
uvloop==0.21.0
aiohttp[speedups]==3.12.15
aiodns==3.5.0
pycares==4.10.0
aiohttp-socks==0.10.1

Workload: many short-lived ClientSessions; some requests via ProxyConnector(..., rdns=False)

Problem starts at aiodns==3.3.0

I don't yet understand how to reproduce the problem locally, but in the production environment the error appears every time

I use this code for requests:

      async with aiohttp.ClientSession(
          json_serialize=orjson.dumps,
          timeout=aiohttp.ClientTimeout(total=9, connect=1.5, sock_connect=1.5),
          connector=ProxyConnector.from_url(f"http://{proxy}", rdns=False),
      ) as sess:
          async with sess.get(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions