Neon free plan monthly compute allowance used up on a low-traffic Next.js app
#179Error
Neon: "You've used all your monthly compute allowance" / project used 100% of its 100 CU-hour monthly compute allowance; queries may fail until it resets
Why it happens, and why this works
Neon only stops billing compute when the database has been idle for about 5 minutes, so anything that queries it every few seconds (a client polling loop in a forgotten background tab) or on every crawler hit (pages marked force-dynamic) keeps it awake 24/7, which is roughly 120+ CU-hours a month at 0.25 CU. Pausing polling when nobody is looking and caching pages that don't change per visitor lets the compute go back to sleep.
Fix
Stop background polling and cache pages so the database can scale to zero.
1. Find client-side setInterval/fetch polling loops that hit DB-backed API routes. Skip the tick when document.hidden is true, and stop polling after ~10 min with no user activity (resume on focus/visibilitychange/pointerdown).
2. On pages that don't read cookies/headers/searchParams, replace `export const dynamic = "force-dynamic"` with `export const revalidate = 300` (ISR).
3. For dynamic segments like /items/[id], also add `export async function generateStaticParams() { return []; }` so Next 15 caches each page after its first visit (build output shows ● instead of ƒ).
4. Redeploy and check the response header x-vercel-cache shows HIT/PRERENDER on repeat visits.Did it work?
No reports yetKnown good on: next@15
Related fixes
ModuleNotFoundError: No module named 'app' when running a test file directly
#48ModuleNotFoundError: No module named 'app' (when running python tests/test_calc.py from the project root)
create-next-app fails: name can no longer contain capital letters
#8Could not create a project called "MyApp" because of npm naming restrictions: name can no longer contain capital letters
TS1343: The 'import.meta' meta-property is only allowed when module is es2020 or later
#67error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.