Skip to content

Apply pool overflow to the ssl_pooling checkout path - #882

Merged
benoitc merged 1 commit into
masterfrom
fix/ssl-pool-overflow
Jun 16, 2026
Merged

Apply pool overflow to the ssl_pooling checkout path#882
benoitc merged 1 commit into
masterfrom
fix/ssl-pool-overflow

Conversation

@benoitc

@benoitc benoitc commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Follow-up to 4.4.1. The overflow fix landed on the plain TCP checkout (and so on default HTTPS, which checks out a TCP conn then upgrades), but checkout_ssl_fallback - the opt-in ssl_pooling path - still had the old fast-fail:

none when TotalInUse >= MaxConn -> {reply, {error, checkout_timeout}, State};

So ssl_pooling with pool_size < max_per_host could still hit the spurious checkout_timeout race. This makes it open an overflow connection like the plain path; per-host concurrency stays capped by max_per_host, and the checkin side already applies the idle-pool cap via pool_has_idle_room/1.

HTTP/2 and HTTP/3 are unaffected: they multiplex over shared connections and have no per-checkout max_connections slot.

Adds test_checkout_ssl_overflow (two SSL checkouts at pool_size=1 both succeed with distinct live conns, in_use=2).

checkout_ssl_fallback still fast-failed with checkout_timeout at
max_connections, unlike the plain checkout path fixed in 4.4.1. Make it
open an overflow connection too (per-host concurrency stays capped by
max_per_host via load regulation); the checkin side already applies the
idle-pool cap. Adds a test covering SSL overflow past pool_size.
@benoitc
benoitc merged commit 9d3cdaf into master Jun 16, 2026
6 checks passed
@benoitc benoitc mentioned this pull request Jun 16, 2026
@benoitc
benoitc deleted the fix/ssl-pool-overflow branch June 16, 2026 09:22
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