Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection Pool Reaper Job #217

caleblloyd opened this issue Mar 31, 2017 · 1 comment

Connection Pool Reaper Job #217

caleblloyd opened this issue Mar 31, 2017 · 1 comment


Copy link

caleblloyd commented Mar 31, 2017

This issue is to track a Connection Pool Reaper as discussed by @bgrainger in #211 (comment):

A relevant quote from Using Connector/Net with Connection Pooling:

Starting with MySQL Connector/Net 6.2, there is a background job that runs every three minutes and removes connections from pool that have been idle (unused) for more than three minutes. The pool cleanup frees resources on both client and server side. This is because on the client side every connection uses a socket, and on the server side every connection uses a socket and a thread.

Prior to this change, connections were never removed from the pool, and the pool always contained the peak number of open connections. For example, a web application that peaked at 1000 concurrent database connections would consume 1000 threads and 1000 open sockets at the server, without ever freeing up those resources from the connection pool. Connections, no matter how old, will not be closed if the number of connections in the pool is less than or equal to the value set by the Min Pool Size connection string parameter.

MySqlConnector does not currently implement any logic like this; for now you could accomplish something similar by setting wait_timeout=180 on the server and letting it expire idle connections.

Copy link

bgrainger commented Apr 12, 2017

Shipped in 0.17.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants