Keep the acceptor accepting through transient accept errors - #196
Open
williamthome wants to merge 1 commit into
Open
Keep the acceptor accepting through transient accept errors#196williamthome wants to merge 1 commit into
williamthome wants to merge 1 commit into
Conversation
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.
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The acceptor exited on any
accept/1error, treating a transient failure the same as a closed listen socket. Descriptor exhaustion (emfile/enfile/system_limit, reachable whenevermax_clientssits above the OSulimit -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.