Some queries on my database server seem to take a long time to respond, and I believe the CPU usage is high. When running ps aux
, I see ~250 "idle" connections (which I believe to be too many). I haven't started doing a full diagnosis, but I wanted to know if this is a good place to start looking.
I am also using PgBouncer with transaction-level pooling. I am suspecting that I can easily reduce the number of idle
connections by tuning the pool size. However, I don't want to start doing too many changes unless there is a good reason to do it.
Can many idle
connections in PostgreSQL 9.2 affect performance?
Thanks very much!