Community guidelines
Be specific and constructive. No vendor spam — promoting your own product belongs in a listing. Anyone can read; posting needs a free account.
A low traffic app uses serverless Postgres and scales to zero. The first burst in the morning wakes the database, then twenty application instances all open pools and we hit connection limits before queries even start. What is the clean fix without keeping everything warm all night?
Do not let every instance open a large pool. Set a small global connection budget and use a proxy or pooler designed for the service. The application autoscaler and database autoscaler need limits that make sense together.
We also added jitter to startup and made health checks avoid a database connection. Before that, the platform saw slow startup as failure and created even more instances. A tiny warm floor during business hours was cheaper than fighting the stampede.
Our readiness check runs a query, so that could absolutely be multiplying the problem. I will change that first.
Good catch. Keep readiness meaningful, but it does not need a fresh database session from every new instance at the same second. Track time to first successful query and connection count during wakeup. Scale to zero is a cost feature with an availability tradeoff, not free sleep mode.