Replies: 1 comment 1 reply
-
This happens because the socket is no longer valid. Sequel correctly recognizes this condition as a disconnect, and removes the connection from the pool. However, the error is still raised, because it is not a condition that can automatically be retried safely. The best way to fix this is to ensure that idle database sockets are not automatically disconnected. If that is not possible, you can use the connection_validator extension (https://sequel.jeremyevans.net/rdoc-plugins/files/lib/sequel/extensions/connection_validator_rb.html). Be sure to read the extension documentation and configure an appropriate connection validation timeout. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey 👋
I'm running a Hanami 2.2 app using Sequel 5.93.0 with TinyTDS to connect to SQL Server. Occasionally I get:
It usually happens during a query in one of my repos after the app has been idle for a while. My DB and network seem fine otherwise.
What could cause this error, and how can I prevent or handle it in Sequel/TinyTDS?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions