fix: reliable CI measurements + docs rewritten with validated numbers - #17
Merged
Merged
Conversation
… breaks unix socket binds) GUNICORN_CMD_ARGS set --reuse-port for every container. On unix socket binds gunicorn 26.0.0 drops the bind address and workers fail to connect (ENOTSUP), so nginx proxied 502 for all requests. Socket-mode (nginx_port_vs_socket, nginx_socker_keepalive) numbers were bogus. Enable reuse_port only for TCP binds via gconf.py. Also propagate pytest's exit code from run_test.sh so failed measurement steps no longer silently pass CI.
…load - raise gunicorn backlog 64->1024 (accept queue overflowed on the unix socket under -c100, nginx saw connect() EAGAIN and returned 502) - raise gunicorn timeout 60->300 (workers were killed mid-request on the heavily CPU-bound 1MB async path, resetting connections into 502s) - allow up to 1% transient non-2xx responses in the test guard, keeping the strict 307-trailing-slash check as a hard error
- raise ab socket timeout -s 60->600: under -c100 the upstream clients waited >60s behind a single serialized 1MB worker, ab dropped them mid-response, nginx aborted the upstream write and the worker wasted work on dead sockets - a self-reinforcing slowdown that left the container effectively wedged (0 responses, rps 0) - raise the subprocess wall-cap 100s->1200s so slow-but-valid runs finish instead of being killed and discarded - fail loudly with a clear message when baseline RPS is 0 (was an opaque ZeroDivisionError)
-scope -s 600 / subprocess cap 1200 to nginx benchmark configs only -default stays -s 60 / cap 100, preserving pool/keepalive semantics
pool=2/40 containers 500 from httpx pool-timeout (60s) under 100 clients; small-pool tests are expected to shed errors. Default stays strict 1%.
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.
Summary
Replaces measurement plumbing that was quietly producing corrupted numbers (transient nginx 502s, ab timeouts, pool-exhaustion 500s were mixed into averages) and rewrites the 4 affected doc pages with data from a single fully-green CI run (36235373898).
Root cause
The old harness trusted the 3-run average even when runs contained non-2xx responses or timed out. Under -c100 concurrent load:
backlog=128+ short timeouts produced intermittent 502s from nginx during 1MB load;run_test.shalso did not propagate the container's exit code, so a failed run still reported "success"./sync_pool/items/and/async_pool/items/that raced against ab's socket timeout. These 500s were silently included in the averages.Fixes (harness + infra)
app_files/Dockerfile,app_files/gconf.py: socket-mode binds fixed,backlog=1024,timeout=300— nginx 502s gone.bin/run_test.sh: propagate container exit code (fail CI on error).test_files/compare_container_performance.py: per-testsocket_timeout/wall_timeout(600s/1200s only for the nginx + keepalive configs) and a per-test non-2xx tolerance guard (pool tests tolerate the known pool-exhaustion 500s, everything else stays strict).test_files/test_nginx_port_vs_socket.py,test_files/test_keepalive.py,test_files/test_connection_pool.py: conflicting sockets/timeouts removed; pool tests annotated with the tolerance.Doc rewrites (validated numbers replace the old ones)
Validation
Note: branch protection requires 3.10 context checks that no longer exist (the matrix is 3.14) — an admin override is required to merge.