Skip to content

fix(bash): stop finished jobs from using up the background job budget - #3869

Open
taciturnaxolotl wants to merge 1 commit into
mainfrom
fix/background-job-budget
Open

taciturnaxolotl wants to merge 1 commit into
mainfrom
fix/background-job-budget

Conversation

@taciturnaxolotl

@taciturnaxolotl taciturnaxolotl commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

Crush counted finished background jobs against the 50-job limit, so once enough jobs had finished, new ones were refused even though nothing was running.

Now only running jobs count against the limit. Finished jobs keep their output readable for 8 hours, and at most 250 of them are kept; the oldest are dropped first.

The running limit is configurable and takes effect when the config reloads:

option max-background-jobs 200

or options.max_background_jobs in crush.json. Zero or a negative value means the default of 50.

@taciturnaxolotl
taciturnaxolotl force-pushed the fix/background-job-budget branch from 7f64baf to 85a7876 Compare September 18, 2026 19:29
@taciturnaxolotl
taciturnaxolotl force-pushed the fix/background-job-budget branch 3 times, most recently from 445386a to d4d367e Compare September 21, 2026 21:35
@andrinoff

Copy link
Copy Markdown
Member

@taciturnaxolotl can we get this in config for overrides? always good to include it

For users who think 50 bg jobs is good and want to run them

@taciturnaxolotl
taciturnaxolotl force-pushed the fix/background-job-budget branch 8 times, most recently from d88b736 to 48e28ff Compare September 29, 2026 02:49
@taciturnaxolotl
taciturnaxolotl force-pushed the fix/background-job-budget branch 3 times, most recently from 7c655e5 to 921d4be Compare October 10, 2026 04:57
@taciturnaxolotl
taciturnaxolotl force-pushed the fix/background-job-budget branch 4 times, most recently from 12a98db to 62c1755 Compare October 14, 2026 13:18
Background jobs counted toward the 50-job cap even after they finished,
and a finished job lingered for eight hours. Once fifty had piled up,
every bash command failed to start, including ones that take
milliseconds. Parallel sub-agents share one budget, so they filled it
quickly.

Only running jobs hold a slot now. Finished jobs stay readable but are
dropped oldest-first once the tracked total gets large.

wip: configurable bg job budget

wip: tnr follow-ups
@taciturnaxolotl
taciturnaxolotl force-pushed the fix/background-job-budget branch from 62c1755 to 0ac04e4 Compare October 14, 2026 17:47
@taciturnaxolotl

Copy link
Copy Markdown
Member Author

added to the config!

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.

2 participants