At commit 151a8d1c922ffadad08399508efe46b207a5894e:
// integrations/entity-extraction-worker/index.ts:577
const INVOCATION_BUDGET_MS = 140_000;
The 140-second ceiling exists to keep the worker within Supabase Edge Functions' invocation timeout. For self-hosted deployments (Deno on a container, no edge-function harness), it's just an arbitrary early-exit that interrupts batch work mid-flight.
On my self-hosted Synology-NAS deployment I was bumping into it before any genuine processing limit (queue backlog, LLM rate limit, postgres pressure). Bumping the constant locally to 1_800_000 (30 min) for one container restart let the worker finish the actual batch.
Suggested patch
const INVOCATION_BUDGET_MS = Number(Deno.env.get(\"INVOCATION_BUDGET_MS\") ?? 140_000);
Default behavior unchanged. Edge-function deployments stay at 140s. Self-hosted deployers can bump.
Context
Same self-hosted setup as #313 (LiteLLM gateway in front of provider APIs). Long batches on initial corpus import benefit from a higher ceiling; weekly maintenance batches typically don't need it but having the knob avoids forking just to flip a constant.
Happy to PR if useful.
At commit
151a8d1c922ffadad08399508efe46b207a5894e:The 140-second ceiling exists to keep the worker within Supabase Edge Functions' invocation timeout. For self-hosted deployments (Deno on a container, no edge-function harness), it's just an arbitrary early-exit that interrupts batch work mid-flight.
On my self-hosted Synology-NAS deployment I was bumping into it before any genuine processing limit (queue backlog, LLM rate limit, postgres pressure). Bumping the constant locally to
1_800_000(30 min) for one container restart let the worker finish the actual batch.Suggested patch
Default behavior unchanged. Edge-function deployments stay at 140s. Self-hosted deployers can bump.
Context
Same self-hosted setup as #313 (LiteLLM gateway in front of provider APIs). Long batches on initial corpus import benefit from a higher ceiling; weekly maintenance batches typically don't need it but having the knob avoids forking just to flip a constant.
Happy to PR if useful.