简体   繁体   English

当运行bin / delayed_job启动时,postgres没有连接

[英]When running bin/delayed_job start, postgres has no connection

When I run bin/delayed_job start , I get the following errors: 当我运行bin/delayed_job start ,出现以下错误:

Job ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper (id=30) FAILED (0 prior attempts) with ActiveRecord::StatementInvalid: PG::ConnectionBad: PQconsumeInput() server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.

PG::UnableToSend: no connection to the server

通过将以下内容添加到config/initializers/delayed_job.rb

ActiveRecord::Base.connection.reconnect!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM