You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using Sequel gem (http://sequel.jeremyevans.net/) with postgres adapter inside Goliath and I've noticed a very weird behavior.
If Goliath is run as a daemon, then it fails with Sequel::DatabaseDisconnectError: PG::ConnectionBad: PQconsumeInput() SSL connection has been closed unexpectedly whereas if it is run normally, this never happens.
This error also doesn't happen with sqlite, both in normal and daemonized modes.
Any hints as to why this might be happening?
The text was updated successfully, but these errors were encountered:
The question then becomes, where should I connect to the DB so that it happens AFTER the process is daemonized? Currently I do it in #initialize. If I connect to the DB in #response the problem goes away, but I don't want to be connecting to the DB upon the first request, it doesn't seem appropriate. I would like the connection to be established before a user hits the site.
I have a rather custom setup in my project which has its own config dir and file, I don't want to contaminate the file tree with more files and folders and confuse users. Is there a way I can somehow inject that piece of code next to the #initialize and #response methods? A hook up like #after_initialize in Rails, maybe?
I've been using Sequel gem (http://sequel.jeremyevans.net/) with postgres adapter inside Goliath and I've noticed a very weird behavior.
If Goliath is run as a daemon, then it fails with
Sequel::DatabaseDisconnectError: PG::ConnectionBad: PQconsumeInput() SSL connection has been closed unexpectedly
whereas if it is run normally, this never happens.This error also doesn't happen with sqlite, both in normal and daemonized modes.
Any hints as to why this might be happening?
The text was updated successfully, but these errors were encountered: