Skip to content

fix(core): serve a connection that arrives while the listeners are paused, and count the accepts the cap refuses (#359) - #360

Merged
EdmondDantes merged 4 commits into
mainfrom
pause-listeners-accept
Sep 30, 2026
Merged

EdmondDantes merged 4 commits into
mainfrom
pause-listeners-accept

Conversation

@EdmondDantes

Copy link
Copy Markdown
Contributor

Closes #359. Needs true-async/php-async#306 merged first: this repository's CI builds php-async main, where h1/062–064 read 503, so the PR stays a draft until then.

  • Tests:
  • Counters in getTelemetry()/getStats():
    • accepts_refused_at_cap_total: the hard-cap safety net's 503s; a pause that holds keeps it at 0, and 062–064 assert that.
    • accept_errors_total: accept failures that were dropped silently.
    • telemetry/009 lists both.
  • Comments: the backpressure note and http_server_pause_listeners said the REUSEPORT hash excludes a paused worker. It does not: the kernel keeps sending that worker its share, which waits for it.
  • Plan: stage S1 in dev/PLAN.md. The design (pause by not accepting, over a uv_poll loop) went through a Critic and a Sage, and the php-async diff through a Critic.

@EdmondDantes
EdmondDantes marked this pull request as ready for review September 30, 2026 12:35
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Coverage

Total lines: 83.75% → 83.79% (+0.04 pp)

File Baseline Current Δ Touched
src/core/http_connection.c 83.80% 83.64% -0.15 pp
src/core/http_connection_tls.c 76.01% 76.26% +0.25 pp
src/http3/http3_callbacks.c 86.69% 86.28% -0.42 pp
src/http3/http3_listener.c 76.76% 78.41% +1.65 pp
src/http3/http3_packet.c 85.22% 90.43% +5.22 pp
src/http_server_class.c 75.99% 75.99% -0.00 pp ●

@EdmondDantes
EdmondDantes merged commit bd919ae into main Sep 30, 2026
8 checks passed
@EdmondDantes
EdmondDantes deleted the pause-listeners-accept branch September 30, 2026 14:39
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.

A connection that arrives while the listeners are paused is answered 503 instead of waiting in the backlog

1 participant