Repository navigation
feat(worker): Add opt-in wait for child exit during recycling - #734
Merged
Merged
Conversation
Contributor
Size Analysis1 component analyzed, 1 component processing iOS Builds
|
Contributor
📲 Install BuildsiOS
Android
|
jamieQ
marked this pull request as ready for review
November 13, 2026 11:17
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.
Update taskbroker-client lib to version 0.20.35. This version contains two additions that should be helpful for launchpad (and really any services with long-running tasks):
1.should mean fewer OOMs due to more concurrent worker process than we've provisioned for, and2.should make deploys a bit slower (but configurable) in exchange for reduced termination of in-flight tasks. The max children stuff will need a config to be enabled before it takes effect, but the grace period changes will go into effect as this deploys.🤖 AI context
Add
LAUNCHPAD_WORKER_WAIT_FOR_CHILD_EXITfor both push and pull workers, backed bytaskbroker-client0.20.35. Setting it to"true"keeps exiting children counted toward concurrency until they exit, preventing recycling from temporarily increasing the number of task children and their combined memory demand. It defaults to false; enabling it trades overlapping replacement for a gap while the old child exits and its replacement starts.Deploy the updated image first, then enable the variable through ops for the intended worker deployments. Keep current memory allocations initially and monitor memory, throughput, backlog, and oldest exiting child age. Disabling the variable and rolling workers restores overlapping recycling.
The dependency release also changes whole-worker shutdown to wait for running tasks while draining results, independently of this flag. The current 60-second pod termination grace period can still interrupt long tasks; adjusting that budget is a separate rollout follow-up.
Uses the recycling option from getsentry/taskbroker#855.