Thread pool exhausts file descriptors when sending messages
warningConnection ManagementUpdated Apr 2, 2023(via Exa)
Technologies:
How to detect:
When sending messages via actor.send() with high thread counts (e.g., 300 concurrent threads), Dramatiq creates one connection per thread, exhausting the OS file descriptor limit and causing 'too many open files' errors.
Recommended action:
Reduce the ThreadPoolExecutor max_workers parameter to limit concurrent connections, or increase the system's max open file descriptors limit using ulimit or OS-level configuration.