On Heroku, Cedar, with Unicorn: Getting ActiveRecord::StatementInvalid: PGError: SSL SYSCALL error: EOF detected

家住魔仙堡 提交于 2019-11-29 03:59:21
Joe Sak

Heroku support suggested that I add this to my Unicorn config:

Append to your config/unicorn.rb:

after_fork do |server, worker|
  if defined?(ActiveRecord::Base)
    ActiveRecord::Base.establish_connection 
  end
end

I added it and we haven't seen a single PGError: SSL SYSCALL error all day.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!