Skip to content

fix(output/http): bound http.Transport connection pool to fix v1.12.0 OOM#837

Open
samcm wants to merge 1 commit into
masterfrom
fix/otel-output-http-oom
Open

fix(output/http): bound http.Transport connection pool to fix v1.12.0 OOM#837
samcm wants to merge 1 commit into
masterfrom
fix/otel-output-http-oom

Conversation

@samcm
Copy link
Copy Markdown
Member

@samcm samcm commented May 14, 2026

PR #835 wrapped the HTTP output sink's transport with otelhttp.NewTransport on top of an unconfigured http.DefaultTransport clone, whose MaxIdleConnsPerHost=2 left the pool starved under load. With BatchItemProcessor running thousands of workers all POSTing to the same upstream, exports stacked up in awaitWantConn (live pprof showed 362 goroutines blocked there, 27,931 total, 30+ GB resident)

This sizes MaxConnsPerHost, MaxIdleConnsPerHost and MaxIdleConns to config.Workers so the pool tracks concurrent export demand instead of throttling against the stdlib default.

… OOM

PR #835 wrapped the HTTP output sink's transport with otelhttp.NewTransport
on top of an unconfigured http.DefaultTransport clone (MaxIdleConnsPerHost=2).
With BatchItemProcessor running thousands of workers all POSTing to the same
upstream, exports stacked up in awaitWantConn, BatchItemProcessor queues
backfilled, and pods OOMKilled after ~13 min. Size MaxConnsPerHost,
MaxIdleConnsPerHost and MaxIdleConns to config.Workers so the pool tracks
concurrent demand.
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