Repository navigation
Retry the build-profile telemetry INSERT through the CI logs cluster memory-pressure spikes - #113409
Merged
Merged
Conversation
…memory-pressure spikes
Since 2026-08-03, the `Post Hooks` step of `Build (arm_release)` fails on
75-86% of all runs, PRs and master alike: the telemetry INSERT into the
shared CI logs cluster is rejected with HTTP 500, Code 241
`MEMORY_LIMIT_EXCEEDED` ("User memory limit exceeded ... OvercommitTracker
decision: Query was selected to stop"), and `build_profile_hook.py` fails
closed. The wave started when #111164 began uploading reduced build
profiles for every PR build, multiplying the INSERT rate.
`LogCluster.do_query` made a single attempt (`retries=1`), while `select`
in the same file already retries 8 times with a growing backoff, its
comment documenting exactly these minutes-long Code 241 pressure spikes.
Retry the INSERT transport on the same schedule, and rewind a file-like
body before every attempt: requests consumes the stream on the first POST,
and re-sending the exhausted stream would run an INSERT with an empty body
- a success with the telemetry silently lost. 4xx rejections still fail
after the first attempt, and the fail-close `assert` stays.
Example report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=109496&sha=latest&name_0=PR&name_1=Build%20(arm_release)
Related: #113408
Co-Authored-By: Claude Fable 5 <[email protected]>
Contributor
|
Workflow [PR], commit [71b2e71] Summary: ✅
AI ReviewSummaryThis PR retries build-profile telemetry uploads on transient 5xx responses and rewinds file-like bodies between attempts, but the writer-path readiness probe is still a one-shot Findings❌ Blockers
Tests
Final Verdict
|
This was referenced Aug 5, 2026
alexey-milovidov
commented
Aug 5, 2026
alexey-milovidov
left a comment
Member
Author
There was a problem hiding this comment.
I doubt it will help, but the change is reasonable - let's try.
This was referenced Aug 5, 2026
This was referenced Aug 6, 2026
larryluogit
pushed a commit
to ClibMouse/ClickHouse
that referenced
this pull request
Aug 9, 2026
`LogCluster.do_query` probed `is_ready` once, before its retry loop. That probe is a `SELECT 1` against the same writer endpoint as the INSERT, so it fails during exactly the memory-pressure spikes (Code 241 for every query) that the retries added in ClickHouse#113409 exist to ride out: a single transient failure of the probe abandoned the upload before any `POST` was attempted, and `build_profile_hook.py` failed the build job closed. Move the probe into the retry loop, on the same growing backoff `select` already uses for it, and report the never-became-ready case explicitly so the fail-close assert is not the only thing in the log. Follow-up to ClickHouse#113409 Related: ClickHouse#113408
This was referenced Aug 9, 2026
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.
Since 2026-08-03, the
Post Hooksstep ofBuild (arm_release)(and other profiled build variants) fails fleet-wide — 354/468 runs on 2026-08-03 and 456/528 on 2026-08-04, on PRs and master alike. The build-profile telemetry INSERT into the shared CI logs cluster is rejected with HTTP 500, Code 241MEMORY_LIMIT_EXCEEDED("User memory limit exceeded ... OvercommitTracker decision: Query was selected to stop"), andbuild_profile_hook.py(correctly) fails closed. The wave started right after #111164 began uploading reduced build profiles for every PR build, multiplying the INSERT rate against the writer endpoint.LogCluster.do_query(the INSERT transport) made a single attempt (retries=1), whileselectin the same file already retries 8 times with a growing backoff — its comment documenting exactly these "minutes-long server-wide memory-pressure spikes (Code 241 for every query)". This PR retries the three profile INSERTs on the same schedule, and rewinds a file-like body before every attempt:requestsconsumes the stream on the first POST, so re-sending the exhausted stream would run an INSERT with an empty body — a "success" with the telemetry silently lost. 4xx rejections still stop after the first attempt, and the fail-closeassertstays, so a genuinely lost upload still fails the job.Unit tests cover the retry-with-rewound-body behavior and the no-retry-on-4xx behavior in
ci/tests/test_build_profile_hook.py.Note this is a mitigation for the transport; the writer endpoint's inflated per-user memory accounting ("would use 2.50 TiB", cap 29.80 GiB) likely also needs infra attention — see the issue.
Example report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=109496&sha=latest&name_0=PR&name_1=Build%20(arm_release)
Related: #113408
Related: #111164
Changelog category (leave one):
Version info
26.8.1.876(included in26.8and later)