-
Notifications
You must be signed in to change notification settings - Fork 134
Description
If any connection is in the queue (dropping, rollback, new, or disconnecting) the pool will not return any connections when polled, even if there are idle connections available. If any of the connections in the queue take a long time to resolve the pool will stop serving new connections for that entire duration.
My server seems to occasionally get stuck on dropping the results of a connection, leaving a single connection stuck in the dropping queue. I haven't found the cause of that and it might be an issue on my end. But because of this issue the entire server locks up until that one stuck connection gets resolved.
Here's the server not serving any new connections for 5 minutes while 1 connection is stuck in dropping, with plenty of idle connections available:

My suggested change would be to allow Pool::take_conn to return a connection from the idle pool even if there are connections in the queue, but to restrict Pool::poll from creating a new connection if there are connections in the queue.