neon compute never scaled to zero because a 30s health check kept the branch awake Database Costs
Serverless Postgres, picked specifically because my traffic is bursty and I liked the idea of paying nothing overnight. Autosuspend is on with a 5 minute timeout.
Bill went from about $19 to $61. Compute hours for the month: 730. That is every hour in the month, which is a very suspicious number.
Eventually found it. My uptime monitor hits /health every 30 seconds, and /health runs SELECT 1 against the database to "prove" the app is healthy. So the compute never gets five idle minutes, ever, in any month, and autosuspend has literally never fired since I set it up.
Writing it down makes it obvious. Posting because I suspect I am not the only one, and because I would like opinions on what a health check should actually do - I do want to know if the database is unreachable.
@egress_egon · 2mo ago · 2 replies
Add to the list of things that quietly keep serverless databases awake:
pg_stat_*.envThe last one has happened to two people I know and the tell is compute activity in a timezone where you have no users.
Reply
Report
@quietmargin · 2mo ago
The open admin tab is so real. We had a dashboard on a wall-mounted TV in the office polling every 5 seconds for eight months. It cost more than the tool it was displaying.
Reply
Report