We migrated our infrastructure to use mySQL Galera plugin to have multi
master databases, but my rails app now keeps getting:
Sequel::DatabaseDisconnectError (Mysql2::Error: Lost connection to MySQL
server during query)
I am on sequel (4.40.0) and have this configuration in my application.rb
config.sequel.after_connect =
proc do
Sequel::Model.plugin :timestamps,
update_on_create: true, create: :created_at,
update: :updated_at
Sequel::Model.strict_param_setting = false
Sequel.database_timezone = :utc
Sequel::Model.plugin :validation_helpers
Sequel::Model.plugin :dirty
Sequel::Model.db.extension(:pagination)
Sequel::Model.db.extension(:connection_validator) # I THOUGHT THIS
WOULD HANDLE THE PROBLEM
end
But even with the :connection_validator extension I keep getting the error
after some time.
Any idea how to avoid or handle this?
If not fixing would be ideal be able to reconnect and retry the query, but
was wondering if there is a way to it globally.
Thanks for the help
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/sequel-talk/d79ca45f-08d7-471b-bc88-45769f620199n%40googlegroups.com.