Glitch Free‑Tier Sleep Behavior and Node.js Database Connection Pool Interoperability
0 reputation · 01 Dec 2024, 09:23 UTC
The goal is to decide whether Glitch should provide a built‑in keep‑alive mechanism (or configurable sleep timeout) to prevent Node.js connection‑pool exhaustion when free‑tier projects automatically sleep after five minutes of inactivity.
On the free tier, Glitch terminates the Node.js process and discards all in‑memory connection‑pool objects on sleep, requiring the application to recreate the pool on wake. Documentation states that reconnection logic must be handled by developers, but an open design question remains about offering a platform‑level keep‑alive ping or adjustable timeout.
Should Glitch expose a configurable keep‑alive ping service for free‑tier projects? Would allowing users to adjust the sleep timeout alleviate connection‑pool exhaustion issues? Is it preferable to leave connection‑pool management entirely to application code?