-
Notifications
You must be signed in to change notification settings - Fork 152
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::ConnectionBadqc:work PQconsumeInput() connection not open #302
Comments
I'm running into an issue where Do you use rails or just plain queue_classic? If so what version? Do you use the automatic connection sharing, or did you disable it by setting I think to help resolve this, the maintainers will need a lot more information that just stacktrace 😄 |
I run into the same issue currently and have no idea how to fix it besides fiddling with |
@vongruenigen Use I was able to reproduce it, when a high load appeared on my web site. After a while of lower load, the |
@siegy22 Thanks, I'll immediately try We'll probably switch to specifying the database via |
@vongruenigen You can also try out my fork, I've a applied a small patch. Which should make the connection sharing with active record work again. 😄 |
@siegy22, thanks, I'll probably try it later somewhen 👍 Is the fix hacky? If not, maybe you could consider opening a PR. |
@siegy22, have you tried setting the if ENV['QC_RAILS_DATABASE'].blank? && ENV['QC_DATABASE_URL'].blank?
db_conf = config.database_configuration[Rails.env].symbolize_keys
db_url = "#{db_conf[:adapter]}://#{db_conf[:username]}"
# more string fiddling ...
ENV['QC_DATABASE_URL'] = db_url.freeze
ENV['QC_RAILS_DATABASE'] = false.to_s
end This seems to work for me too, but I'm not happy with building the database URL by concatenating strings tbh. |
Yeah I've tried several ways to do what you're attempting to do, but always found a new way which made it fail and ended up running from my fork for now. I'm trying to get this fixed upstream, and maybe even get a release 😄 |
@siegy22 I'm checking out your code ^ -- looks like it might be backwards incompatible? |
@siegy22 this might be due to connections taken with I opened #317, as it looks distinct from the problem described initially here: |
Any chances rails/rails#36473 (released 2 days ago as part of Rails 2.5.4) fixed the problem? |
@pkotnis no, QueueClassic does not call |
How can I fix this issue? It's happening in production but not development. There is an issue from 2013 that seems relevant, but slightly different. My setup with rails is totally straightforward, no shared connections, etc. Any ideas would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered: