rds postgres hits too many clients whenever the batch job runs
Every night at 2am the app starts throwing FATAL: sorry, too many clients already. RDS PostgreSQL 15 on db.t3.medium. There are four app pods each with a pool of 20 connections, plus a batch job that opens 50. max_connections on that instance class is around 168, so it adds up. What's the least disruptive fix? The batch job is a Django management command, if that helps.
4 replies