-
-
Notifications
You must be signed in to change notification settings - Fork 625
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
Reconnecting in pool #390
Comments
yes, the connection is removed if it can't be reused ( network error, server forcibly closed, client ended connection etc ). Unused connections are obviously not disconnected (this is the whole point of pool) but we might add an option "disconnect unused connection if idle for more than certain time" - see #321 Currently there is no option to keep pool in "pre-heated" state (minimum number of open connections) - you have at most |
if the server forcibly closed, what happen of Mysql2 pool , what should we do in code to keep the query or insert normal ? |
any active connections will be closed in that case ( and unfinished commands with end with error ). Next time you'll try to get connection from the pool it'll try to connect a new one |
Mysql2 pool keeps unused connections (they appear in SHOW PROCESSLIST; as in Sleep state)
but what will happen when one of these connection gets broken? mysql2 pool will remove them or reconnect?
The text was updated successfully, but these errors were encountered: