Conversation
Jansen-w
marked this pull request as ready for review
September 18, 2026 20:11
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
Prevent unbounded accumulation of decoded OTLP requests when the pipeline is backpressured.
Problem
The source output channel is bounded, but concurrent HTTP and gRPC handlers can decode complete requests before waiting to enqueue their events. When downstream processing slows or stops, those suspended handlers retain their decoded events outside the channel. Consequently, channel capacity does not bound total ingress memory, and increasing client concurrency can exhaust process memory even with a bounded downstream buffer.
Solution
max_concurrent_requests. When unset, the maximum uses configured runtime worker count, with available parallelism as a fallback.request_timeout_secs, defaulting to 30 seconds, so incomplete uploads and stalled requests cannot hold permits indefinitely while awaiting progress. Timeouts return HTTP 503 or gRPC UNAVAILABLE. This timeout is cooperative and cannot preempt synchronous decoding.This bounds concurrent request processing, not total process memory in bytes. Request sizes, decoding overhead, and downstream buffers still contribute to memory usage. A timeout does not roll back events already enqueued, so retries can duplicate previously accepted events.
Commit structure
Vector configuration
Example of explicit controls:
Existing configurations gain adaptive admission and the default timeout. Both settings must be positive when specified. Operators can tune them for request sizes, memory availability, and expected delivery latency.
How did you test this PR?
Before/after memory reproduction
Both local runs exercised OTLP/HTTP logs with 16 runtime workers, 300 concurrent clients, and 12,000 records per request, with a 3,000-byte message body per record. Each protobuf request was 36,108,010 bytes (about 34.44 MiB). The pipeline had no transforms and used a directly disk-buffered HTTP sink whose endpoint deliberately stopped responding. The disk buffer was filled before the large-request burst.
Memory was measured from native macOS process RSS using
ps -o rss, converted from KiB to bytes. These were not Kubernetes/cgroup measurements or OOM-killer tests.08b2de4725)For the patched run:
sources-opentelemetry,sinks-httpand used default adaptive admission and the 30-second timeout.Interpretation: The patched run did not reproduce the earlier multi-GiB request accumulation, despite the same offered request size and concurrency. This is a behavioral regression check, not an apples-to-apples performance benchmark: the two runs used different builds and harnesses, their baselines differ, and there was no same-build unpatched control. It does not establish a universal RSS ceiling or cover gRPC load at this scale.
Automated checks
Local validation limitations: CUE was unavailable for generated-doc validation, Node was unavailable for repository-wide Markdown/Prettier checks, and test-target Clippy encounters a pre-existing
unused_asyncwarning insrc/test_util/http.rs.Does this PR include user facing changes?