Resolving an error in production with NeonDB
tldr: Exceeding 10 branches on a free plan breaks your DB connection
Tried going to the app URL. The landing page worked but everything requiring pulling and displaying data failed.
- It looked like a pretty obscure error — frontend did not have a descriptive message.
- Inspect → POST request shows DB error, console request failed, endpoint unavailable.
- Tried TablePlus to see if a direct connection works. Similarly, endpoint unavailable
- Went to the source (NeonDB). Checked the connection was idle.
- Was on the verge of just upgrading the plan but noticed that none of the usage patterns seem to suggest that it needed an upgrade: compute horus low, storage, low, not much data transferred (it is a super simple CRUD app)
- Only number that stood out was branches 10/10. Turns out if you exceed/ have 10 branches, your DB connection will be suspended and it will be set as idle. Interesting but also nuts. Deleted some branches.