Idle App's Health Checks and Polling Kept Neon Database Awake, Exhausting Free Compute
A developer's staging app with no users saw its Neon serverless Postgres database stay awake for 720 hours in a month, exhausting the free-tier compute allowance. The database was repeatedly woken by a health endpoint that ran a query, a background worker querying every five minutes, and frontend code that fetched data on every page mount and polled frequently. Because each query reset Neon's five-minute auto-suspend timer, the database never went idle despite zero traffic. The fixes included making the health check skip the database, gating the worker behind a Redis flag, and cutting unnecessary frontend requests. The developer concluded that work that can happen without users must not touch the database.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in