Repository navigation
Conversation
Serve started a goroutine per accept with no bound, and every unauthenticated connection also opened one to the borrowed site, so a flood exhausted the relay and was passed on to a site it does not own. Config.MaxConns (default 256, -max-conns on cmd/node) caps connections held at once, Warren sessions and splices alike. At the cap the relay stops calling Accept, so new connections wait in the kernel backlog and then go unanswered, the way an overloaded server behaves, and nothing distinguishes probes from Warren clients. Only held connections and the warm pool dial the site, so its footprint is bounded at MaxConns + warmPoolSize. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes ROADMAP H7: no connection limits anywhere.
Problem
Servestarted one goroutine per accept with no bound, and every unauthenticated connection also opened a connection to the borrowed site. A flood therefore exhausted the relay and was passed on to a site the relay does not own.Change
Config.MaxConns: defaultDefaultMaxConns= 256. Exposed oncmd/nodeas-max-conns.Servetakes a slot beforeAcceptand releases it when the connection's handling ends, whether a Warren session or a splice.Accept. New connections wait in the kernel backlog, and once it fills their SYNs go unanswered. That is an overloaded server, not a Warren-specific refusal, and it applies to probes and Warren clients alike. Choosing whom to refuse would mean reading connections first, which recreates the split H8 removed.MaxConns + warmPoolSizeconnections reach it. No separate upstream cap was needed (the backlog had planned one in the warm pool; reasoning is in the ROADMAP row).Handlerdoc: a connection counts against the cap until the handler returns.Known residuals (in ROADMAP/CHANGELOG)
MaxConnsconnections.Tests (
conncap_test.go)TestServeHoldsAtMostMaxConns: fills a cap of 2, checks a 3rd connection is not served, frees a slot, then checks the 3rd is served. Checked against the cap removed: it fails.TestConfigMaxConnsDefault: an unset or negative cap falls back to the default.Locally (Windows):
go build,go vet,go test ./...and LF-normalisedgofmtall pass. CI covers-race.🤖 Generated with Claude Code