Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky prom remote write exporter concurrency test #37430

Conversation

pjanotti
Copy link
Contributor

@pjanotti pjanotti commented Jan 23, 2025

Fix #37104

This is more an artifact of the test firing an unbounded number of go routines each one making its own HTTP request. Although keepalive is enabled by default the code ends up not re-using many of the connections causing the many connections to end up in a TIME_WAIT state. In order to avoid this the test now limits the number of concurrent requests and has a small change to the actual code to facilitate re-use of existing TCP connections used by the HTTP client.

Although there is a change to non-test code I don't consider this a bug worth changelog because no user of the component should reach such high burst of "push metrics" in any reasonable production scenario.

@pjanotti pjanotti requested review from dashpole and a team as code owners January 23, 2025 06:24
@pjanotti pjanotti added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Jan 23, 2025

var wg sync.WaitGroup
wg.Add(n)
maxConcurrentGoroutines := runtime.NumCPU() * 4
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there are still failures on this test it may be necessary to reduce even further the amount of concurrency allowed here.

@pjanotti pjanotti added the Run Windows Enable running windows test on a PR label Jan 23, 2025
@songy23 songy23 merged commit 39816b7 into open-telemetry:main Jan 23, 2025
221 of 222 checks passed
@github-actions github-actions bot added this to the next release milestone Jan 23, 2025
@pjanotti pjanotti deleted the fix-flaky-prom-remote-write-exporter-concurrency-test branch January 23, 2025 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exporter/prometheusremotewrite Run Windows Enable running windows test on a PR Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[test] Test_PushMetricsConcurrent fails on Windows 2025 GH runner
4 participants