We have applications that keep large amounts of idle connections (thoudsands). Does that hurt performance of the database? Is it worth it to lower the number idle connetions for performances sake?


Not much.

Why are there thousands? Hundreds is reasonable.

Each connection takes some amount of RAM; if there are too many connections, you could run out of RAM, which would be bad for performance.

Also, if more than a few dozen connections suddenly get busy, they would be contending with each other for CPU, RAM, I/O, etc.

There is a "wait_timeout" that will disconnect a connection if it is idle for too long.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.