Hey,

Jeremy answered this question multiple times. I also asked it. Here's my question and it's response. I think it will answer your question and you should be able to solve your issue.

https://stackoverflow.com/questions/66443278/occurrence-of-sequeldatabasedisconnecterror-at-puma-worker-even-though-the-db

Best regards

Am 07.07.2021 09:28, schrieb [email protected]:

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 [1].



Links:
------
[1] https://groups.google.com/d/msgid/sequel-talk/d79ca45f-08d7-471b-bc88-45769f620199n%40googlegroups.com?utm_medium=email&utm_source=footer

--
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/4d3933cc9054fad4fbbfb7326d5628bb%40wurzweb.com.

Reply via email to