Skip to content

fix(trigger): poll the checkpoint outbox every 30 minutes, not every minute - #5

Merged
ahmedEid1 merged 1 commit into
masterfrom
fix/outbox-cron-neon-quota
Oct 30, 2026
Merged

ahmedEid1 merged 1 commit into
masterfrom
fix/outbox-cron-neon-quota

Conversation

@ahmedEid1

Copy link
Copy Markdown
Owner

Why

The checkpoint-delivery-outbox schedule 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/health has reported dbReachable: false since July.

What

  • The outbox now polls every 30 minutes (*/30 * * * *), with the reason in a code comment.
  • The test and the retry-delivery route comment are updated to match.

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:deploy once 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
  • eslint is clean on the changed files

🤖 Generated with Claude Code

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

vercel Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
thoth Error Error Oct 30, 2026 7:07pm UTC

@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cb7227e6-534a-47dc-adf1-f5bf48fc28f0
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ahmedEid1
ahmedEid1 merged commit c10f9e9 into master Oct 30, 2026
4 of 5 checks passed
@ahmedEid1
ahmedEid1 deleted the fix/outbox-cron-neon-quota branch October 30, 2026 19:10
ahmedEid1 added a commit that referenced this pull request Nov 1, 2026
The database was paused for using up the free compute allowance, so the
Vercel builds for #4 and #5 failed at prisma migrate deploy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch had an error being deployed

1 failed deployment
Preview — 840146ff Deployed Oct 30, 2026 by vercel[bot]
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.

1 participant