Temporal is opening up more than maxConns to our Postgres database

Hey folks, we started using temporal a few months ago and have recently noticed that the number of connections its opening to our postgres instance is higher than the maxConns we have configured.

For each temporal service, we are running 2 pods, so total of 8 temporal pods. Each of these pods is configured with maxConns as 5 and maxIdleConns as 5. Based on our understanding, there should be a maximum of 40 connections open in total (8 pods * 5 maxConns per pod) to the temporal database in our postgres server

However, on postgres metrics we can see that the temporal database usually has a higher connection count(40-50), and in a rare instance it reached upto 140 connections.

We wanted to understand if our understanding of the maxConns configuration is accurate or not.

We are using temporal v1.24.3

Thanks!

1 Like