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

后端 未结 1 1270
陌清茗
陌清茗 2020-12-16 19:28

Heroku support says this has to do with their version of libssl on shared databases, but we\'ve encountered it on a project that\'s on a dedicated database, too.

Bas

相关标签:
1条回答
  • 2020-12-16 19:47

    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.

    0 讨论(0)
提交回复
热议问题