From 99f40df7723c84b135b6f49df4691a2fac7386ca Mon Sep 17 00:00:00 2001 From: Theodore Li Date: Tue, 12 May 2026 12:34:09 -0700 Subject: [PATCH 1/2] improvement(scheduler): raise per-tick claim budget to drain backlog MAX_CRON_CLAIMS 20 -> 100; reserved workflow/job slots 10/10 -> 50/50. Throughput was capped at 20 schedules/tick which created a 20+ hour backlog when due work exceeded ~1 item per cron-second. --- apps/sim/app/api/schedules/execute/route.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/sim/app/api/schedules/execute/route.ts b/apps/sim/app/api/schedules/execute/route.ts index eb2d9bc96b5..f7bb6c27e1f 100644 --- a/apps/sim/app/api/schedules/execute/route.ts +++ b/apps/sim/app/api/schedules/execute/route.ts @@ -21,8 +21,8 @@ export const dynamic = 'force-dynamic' export const maxDuration = 3600 const logger = createLogger('ScheduledExecuteAPI') -const MAX_CRON_CLAIMS = 20 -const RESERVED_WORKFLOW_CLAIMS = 10 +const MAX_CRON_CLAIMS = 100 +const RESERVED_WORKFLOW_CLAIMS = 50 const RESERVED_JOB_CLAIMS = MAX_CRON_CLAIMS - RESERVED_WORKFLOW_CLAIMS const STALE_SCHEDULE_CLAIM_MS = getMaxExecutionTimeout() From 4591c1b44831a7572c66da159ba7c7335a06a6fe Mon Sep 17 00:00:00 2001 From: Theodore Li Date: Tue, 12 May 2026 12:57:24 -0700 Subject: [PATCH 2/2] improvement(scheduler): raise per-tick claim budget to 200 Bumps MAX_CRON_CLAIMS 100 -> 200 (workflow/job split 100/100). Pairs with the fire-and-forget cron Lambda change so per-tick processing time is no longer bounded by the Lambda's 50s HTTP timeout. --- apps/sim/app/api/schedules/execute/route.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/sim/app/api/schedules/execute/route.ts b/apps/sim/app/api/schedules/execute/route.ts index f7bb6c27e1f..9c86fc1c4f6 100644 --- a/apps/sim/app/api/schedules/execute/route.ts +++ b/apps/sim/app/api/schedules/execute/route.ts @@ -21,8 +21,8 @@ export const dynamic = 'force-dynamic' export const maxDuration = 3600 const logger = createLogger('ScheduledExecuteAPI') -const MAX_CRON_CLAIMS = 100 -const RESERVED_WORKFLOW_CLAIMS = 50 +const MAX_CRON_CLAIMS = 200 +const RESERVED_WORKFLOW_CLAIMS = 100 const RESERVED_JOB_CLAIMS = MAX_CRON_CLAIMS - RESERVED_WORKFLOW_CLAIMS const STALE_SCHEDULE_CLAIM_MS = getMaxExecutionTimeout()