Skip to content

Keep the acceptor accepting through transient accept errors - #196

Open
williamthome wants to merge 1 commit into
mainfrom
fix/acceptor-transient-errors
Open

Keep the acceptor accepting through transient accept errors#196
williamthome wants to merge 1 commit into
mainfrom
fix/acceptor-transient-errors

Conversation

@williamthome

Copy link
Copy Markdown
Member

Description

The acceptor exited on any accept/1 error, treating a transient failure the same as a closed listen socket. Descriptor exhaustion (emfile / enfile / system_limit, reachable whenever max_clients sits above the OS ulimit -n) or a connection aborted before accept completed would therefore retire that acceptor permanently. With enough of them the pool drains and the listener goes deaf while still holding its port, with nothing logged to explain it.

Only {error, closed} now means the listener is stopping and the acceptor exits cleanly. Every other error emits a [roadrunner, listener, accept_error] telemetry event carrying the listener name and reason, backs off briefly to bound the retry and telemetry rate while the box reclaims descriptors, and resumes accepting.

The accept loop treated every accept/1 error as terminal and exited, so file-descriptor exhaustion (emfile/enfile/system_limit) -- reachable once max_clients sits above the OS ulimit -n -- silently drained the acceptor pool and left the listener permanently deaf with no diagnostic. Now only a closed listen socket exits; a transient error emits [roadrunner, listener, accept_error] and retries after a short back-off.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant