On Friday, April 28, 2017 at 7:03:32 AM UTC-7, Gergely Borsothy-Gaal wrote:
>
> We are using Sequel in our application with threaded pools and the Mysql2
> adapter. From time to time, we are experiencing the following error
> consecutively: "Mysql2::Error: MySQL client is not connected". Our
> application is having troubles recovering from this state, and crashes
> eventually, but a newly launched process has no problem connecting
> whatsoever. Unfortunately we can not determine for sure if it's a network
> problem, or an issue with the server. I have been inspecting the Sequel
> source, but could not really tell for absolutely sure, so could you please
> confirm that broken connections like the one I have just described are
> actually removed from the connection pool?
>
Broken connections are removed from the connection pool if Sequel
recognizes them as broken. I don't think that specific error message is
recognized, it would have to be added to the 6 already there. I can do
that before the next release. In the meantime, you can do the following in
your app:
def DB.disconnect_error?(e)
super || e.message =~ /MySQL client is not connected/
end
Thanks,
Jeremy
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.