-
Notifications
You must be signed in to change notification settings - Fork 337
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
A connection in the pool that is closing due to ConnectionLifetime being exceeded should not result in a Warning message #586
Comments
Is this the message?
I agree that it doesn't describe the situation very well. And I suppose if the user has opted into I'm just curious: what's your reason for setting a |
Correct, that is the message. The reason we are using ConnectionLifetime is that we have technical limitations on the number of connections the server can handle. The server uses a wait_timeout to kill idle connections (if we don't, we get 'too many connection' errors). The clients (the number of which is small but not fixed) are each configured with a small connection pool and work in bursts. Note that we do not need to explicitly set a Connection Lifetime, we are trying to get rid of the "PoolX received invalid SessionN" warning message in our logs (which arose due to the server killing connections after wait_timeout expired), and we figured that by setting a Connection Lifetime, the connector would silently close connections for which the lifetime was exceeded. |
Have you tried using |
That is a good suggestion; I'll try that and let you know. |
Update: the (many) invalid SessionN warning messages are now gone, but unfortunately we now see the following warning messages in the log: "Pool{MySqlPool} is empty; recovering leaked sessions" Would it make sense to use a minPoolSize of 1 to eliminate these? Or would this connection also be terminated by the IdleTimeout, followed by a subsequent reconnect? |
Increasing There are two possible causes for this:
(I suspect no. 2 isn't the problem for you because you wouldn't have seen the message "PoolX received invalid SessionN; destroying it" if you weren't closing connections, and because you didn't report seeing any "RecoveredSessionCount=N" messages.) That said, this message doesn't really need to be a warning, so its severity should be reduced to Info, I think. |
Agreed. I use PoolSize as a backstop in situations where directly controlling concurrence is prohibitive. It works well, but those “warnings” can get annoying. |
Reduced severity of the "Pool is empty" message in b2d1c0e. |
Thanks! Administrative question: should I close this issue? |
No need; GitHub will automatically close it when the commit is pushed to |
Fixed in 0.48.0. |
I've noticed that if a connection is closed due to the Connection Lifetime being exceeded, it will result in a (cryptic) Warning message. IMO this should be an Information level message at best.
The text was updated successfully, but these errors were encountered: