mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-28 18:19:28 +00:00
The per-IP httpx transports were built once in __init__ and never torn down. A connect that reached ESTABLISHED and was then closed by the peer left its socket in CLOSE_WAIT inside the pool, and the failure path only logged and continued — so the poisoned pool was retained and leaked one descriptor per retry. With DNS for api.telegram.org failing, every poll fell through to the seed IP and leaked another fd every ~2.5s. The bot gateway reached 177 CLOSE_WAIT sockets against launchd's 256 soft limit and wedged: accept() on the gateway port, config reads and DNS resolution all failed with EMFILE, which in turn made the primary path fail and fed the loop. Build fallback transports lazily and discard them on a retryable connect failure, and bound every pool at 8 connections (httpx defaults to 100, so two seed IPs plus primary could alone exceed the fd ceiling). Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering> |
||
|---|---|---|
| .. | ||
| dingtalk | ||
| discord | ||
| feishu | ||
| google_chat | ||
| homeassistant | ||
| irc | ||
| line | ||
| matrix | ||
| mattermost | ||
| ntfy | ||
| photon | ||
| raft | ||
| simplex | ||
| slack | ||
| sms | ||
| teams | ||
| telegram | ||
| wecom | ||