fix(worker-pool): cap timeout backoff at 5 minutes#1707
Closed
vincent-0825 wants to merge 1 commit into
Closed
Conversation
requeueAfterTimeout doubled timeoutMs on every split/retry with no upper bound. With factor=2, a single pathological file could push the effective timeout from 30s -> 8min in just 4 splits -> 30+ min on deeper splits. Cap at 5 minutes regardless of split depth. Not a fix for any currently-reproducible runaway — defensive only. The recent 11min stuck reindex did not hit this path (no "Worker N parse job idle timeout" warnings in pino output), but the unbounded backoff remains a latent footgun. DDD-BYPASS-CC: surgical defensive guard, no domain model impact. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@bener888 is attempting to deploy a commit to the NexusCore Team on Vercel. A member of the Team first needs to authorize it. |
Collaborator
|
This has been worked on in a more refined scale in #1693. Thanks for you contribution though! |
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
Why
A pathological file can repeatedly time out and double its retry timeout. Without an upper bound, 30s can grow past 30 minutes before retry budgets are exhausted. This keeps retries defensive without changing the normal fast path.
Tests
npx vitest run test/unit/worker-pool-timeout-cap.test.tsnpm run build