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

MySQL Server has gone away #8

Closed
kawamanza opened this issue Aug 7, 2019 · 2 comments · Fixed by #9
Closed

MySQL Server has gone away #8

kawamanza opened this issue Aug 7, 2019 · 2 comments · Fixed by #9
Labels
enhancement New feature or request

Comments

@kawamanza
Copy link
Contributor

The pooled connection might to be idle for a long time, and the server may disconnect or kill the process for any reason. In this case, the broker should check the connection before deliver it to the requester. It would be nice if PyMySQLPool do a ping() after some amount of time to force reconnection.

@prprprus
Copy link
Owner

prprprus commented Aug 7, 2019

Hi, @kawamanza

Thanks for your awesome advice, I think you are right, are you interested in submitting a pr 😏?

@kawamanza
Copy link
Contributor Author

Hi @prprprus,

Great. I did a monkey-patch on a project that I am using your lib just to workaround this issue. I'll try to reply the code to a PR for your review.

@prprprus prprprus added the enhancement New feature or request label Aug 8, 2019
prprprus added a commit that referenced this issue Aug 8, 2019
Support for ping check to get healthy connections #8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants