【问题标题】:Spawn gem on heroku - "PGError: server closed the connection unexpectedly"在 heroku 上生成 gem - “PGError:服务器意外关闭了连接”
【发布时间】:2011-10-13 11:01:04
【问题描述】:

我在 rails 3 应用程序中使用 Spawn gem - 它是在 https://github.com/rfc2822/spawn 上的 rails3 适配 fork

我的应用程序部署在 heroku 上,当我尝试生成时出现此错误:

 app[web.1]: ### ../controllers/messages_controller.rb:10:in `create_message': About to spawn
 app[web.1]: spawn> parent PID = 1
 app[web.1]: spawn> child PID = 49
 app[web.1]: ### ../controllers/messages_controller.rb:17:in `create_message': After spawn
 app[web.1]:   Task Load (1.2ms)  SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = 80 LIMIT 1
 app[web.1]: PGError: server closed the connection unexpectedly
 app[web.1]:    This probably means the server terminated abnormally
 app[web.1]:    before or while processing the request.

按照 spawn 文档的建议,我的 config/database.yml 中有这个选项:

reconnect: true

你觉得和这个有关系吗?

有点茫然……在我去调查之前,有人知道是什么原因造成的吗? 干杯,最大

【问题讨论】:

    标签: ruby-on-rails-3 heroku spawn


    【解决方案1】:

    我最终改用了 girl_friday gem,这是一个简单的分叉队列系统。它对我很有用。

    【讨论】:

      猜你喜欢
      • 2011-12-24
      • 2011-02-06
      • 2017-03-31
      • 1970-01-01
      • 2018-01-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-20
      相关资源
      最近更新 更多