0

我在 rails 3 应用程序中使用 Spawn gem - 这是https://github.com/rfc2822/spawn上的 rails3-adapted 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

你觉得和这个有关系吗?

有点不知所措......在我去调查之前,有人知道是什么原因造成的吗?欢呼,最大

4

1 回答 1

0

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

于 2011-10-13T15:47:46.687 回答