Repository navigation
fix(trigger): poll the checkpoint outbox every 30 minutes, not every minute - #5
Merged
Merged
Conversation
…minute The every-minute poll kept the Neon free-plan compute awake around the clock (it only scales to zero after 5 idle minutes), so the project used up its monthly compute allowance and Trigger.dev's free credit by mid-month and the database stayed down until the next reset. Stranded checkpoints are rare and their wait-tokens stay valid for 24 hours, so a 30-minute poll only delays recovery; the run page's retry button still delivers immediately. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This branch had an error being deployed
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.
Why
The
checkpoint-delivery-outboxschedule ran every minute and queried the database each time. Neon's free-plan compute only scales to zero after 5 idle minutes, so it never slept: the project used its monthly compute allowance (110 of 100 CU-hours in October) and Trigger.dev's $5 free credit by mid-month. The database then stayed paused until the next reset, which is why/api/healthhas reporteddbReachable: falsesince July.What
*/30 * * * *), with the reason in a code comment.A stranded checkpoint is rare, and its wait-token stays valid for 24 hours, so the slower poll only delays automatic recovery. The run page's retry button still delivers immediately.
Also done outside the repo: the Neon compute for this project is capped at 0.25 CU (it could autoscale to 2 CU).
After merging
Run
pnpm trigger:deployonce so Trigger.dev registers the new schedule. The schedule lives in code, and the dashboard can't change it.Checks
vitest run tests/trigger/checkpoint-outbox.test.ts: 9 passed🤖 Generated with Claude Code