-
Notifications
You must be signed in to change notification settings - Fork 217
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
Sequel postgres connection fails when server run as daemon #314
Comments
Ok, so a good explanation of what's going on is here: thuehlinger/daemons#31 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 |
You should do it in your config file: https://github.com/postrank-labs/goliath/wiki/Configuration :) |
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 |
You can pass a custom config via -c directive; check the internal plumbing. |
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: