2016-04-27 39 views
1

當我運行bin/delayed_job start,我得到以下錯誤:當運行斌/ delayed_job的開始,Postgres的無連接

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 

回答

2

加入解決以下到config/initializers/delayed_job.rb

ActiveRecord::Base.connection.reconnect!