Skip to content

fix(worker-pool): cap timeout backoff at 5 minutes#1707

Closed
vincent-0825 wants to merge 1 commit into
abhigyanpatwari:mainfrom
vincent-0825:fix/worker-pool-timeout-cap-upstream
Closed

fix(worker-pool): cap timeout backoff at 5 minutes#1707
vincent-0825 wants to merge 1 commit into
abhigyanpatwari:mainfrom
vincent-0825:fix/worker-pool-timeout-cap-upstream

Conversation

@vincent-0825

Copy link
Copy Markdown

Summary

  • cap worker-pool timeout backoff at 5 minutes when requeueing timed-out parse jobs
  • keep existing doubling behavior below the cap
  • add a regression unit test for capped and uncapped backoff cases

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.ts
  • npm run build

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>
@vercel

vercel Bot commented May 19, 2026

Copy link
Copy Markdown

@bener888 is attempting to deploy a commit to the NexusCore Team on Vercel.

A member of the Team first needs to authorize it.

@magyargergo

Copy link
Copy Markdown
Collaborator

This has been worked on in a more refined scale in #1693. Thanks for you contribution though!

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.

3 participants