-
Notifications
You must be signed in to change notification settings - Fork 11
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 reconnect support #18
Comments
@sonots says
|
@koichiro says
|
@tagomoris @sorah Any opinions? > keep connection |
Sequel::ConnectionPool and Sequel::ConnectionValidator look good. I think that we should not solve such problems in focuslight code (for more databases that anyone wants). |
It seems Sequel::ConnectionPool is not necessary because we are not using threads internaly. I will check ConnectionValidator, but it looks it just checks connection every 1 hour. So, it would not be suitable for our purpose because what we want to do is to reconnect everytime when disconnection is detected.
|
I examined ConnectionValidator.
We get InternalServerError once. At 2nd request, the connection is recovered.
This issues queries like below and looks stupid,
If we wait 20 seconds, the connection is recovered without seeing IntervalServerError.
After all, I do not think ConnectionValidator is useful. |
With #17, focuslight now uses Sequel, but still remains some issues for mysql support.
Currently, focuslight keeps connection to MySQL in a process. However, it
does not reconnectgets connection error once, then reconnect when the connection is killed by some reasons such as mysql restart.So, it requires to restart focuslight itself.I made sure how GrowthForecast works. One option is to follow the GrowthForecast way.
SQLite: keep to open
MySQL: connect everytime on each request
The text was updated successfully, but these errors were encountered: