Your Go service has 600 Postgres connections and uses 6 of them
Last month a routine scale-up took down our orders database. Not CPU, not disk. Connections. Postgres said FATAL: sorry, too many clients already and every service that touched it fell over together. How we got there 40 pods of one Go service, each with a pgx pool. Nobody had set MaxConns , so pgxpool used its default: the larger of 4 and runtime.NumCPU() . Our nodes have 16 cores. 40 times 16 is 640 possible…
- The NumCPU versus GOMAXPROCS detail is excellent. Most people stop at automaxprocs and think they fixed it.