-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
PG::UnableToSend: SSL SYSCALL error: EOF detected #746
Comments
Can you better describe the behavior you are getting? If it is:
Then Sequel is operating as designed. If however the connection is not recognized as a disconnect, and you continually receive the error every time you try to issue a query, then that is an issue. You should post the error class that Sequel used when wrapping the exception. If it is Sequel::DatabaseDisconnectError, then there is no problem. If it is just Sequel::DatabaseError, then that is a problem. |
Sorry about that, yes it is a Sequel::DatabaseDisconnectError. It seems to happen on the first requests I do to my web app after I phased-restart puma (the app server), and the requests fail. However on subsequent requests it seems the connection is re-established automatically and there are no more problems. Since I am on MRI in this case I am wondering if I am missing some settings for puma. For example this is what they recommend when using ActiveRecord:
I don't think I had this problem when running on JRuby. |
As mentioned in the documentation (http://sequel.jeremyevans.net/rdoc/files/doc/code_order_rdoc.html), if you are using a preforking web server, you need to disconnect before fork. I know unicorn offers a before_fork hook, I'm not sure if puma does. If not, you just need to disconnect after your app loads. As this is expected Sequel behavior, I'm closing this issue. |
Thanks for the clarification! |
Hey,
I've been recently getting this error, after I changed from Heroku's database to self-hosted (on same machine, it's a very low traffic site atm). FYI I am running sidekiq as well, and no ActiveRecord (its railtie is not loaded).
While trying to figure this out I stumbed on an issue in ActiveRecord:
rails/rails#12867
In case this gives any clue as to what may be going on. I don't really know what it could be, but it usually happens after I deploy. I am using puma and phased restart, is it possible I am missing some after fork settings for puma? Running MRI 2.0 in this case. I usually run JRuby and don't remember having this problem there (similar setup with puma).
Thank you
The text was updated successfully, but these errors were encountered: