【问题标题】:unicorn dies and won't tell me why独角兽死了,不会告诉我为什么
【发布时间】:2012-02-10 16:01:09
【问题描述】:

我已将 Rails 应用程序从 linux 机器移至 mac os x lion 服务器。应用程序在 linux 机器上运行得非常好, 没有改变堆栈(两台机器上的 nginx + unicorn)。但我不能让独角兽再次工作。它只是死后 开始时不留太多痕迹,仅(在 unicorn.sterr.log 中):

I, [2012-02-10T16:45:04.770376 #21138]  INFO -- : master process ready
E, [2012-02-10T16:45:05.142841 #21138] ERROR -- : reaped #<Process::Status: pid=21813,exited(1)> worker=0

(我有并且只需要 1 个工作进程,它是一个小型实用程序) 似乎工作进程异常退出(退出状态1),但production.log或unicorn.stdout.log中没有输出。我可以使用 mongrel 或 webrick 在生产模式下启动 rails 服务器,运行良好,接受连接等。没问题。

有什么想法或调试技巧吗?

我正在使用:

* Mac OS X Lion Server 10.7.3
* Nginx 1.0.11
* REE 2012.01
* Rails 3.0.x
* Unicorn 4.1.1
* PostgreSQL 9.1
* Homebrew
* RVM (system wide)

【问题讨论】:

  • 如何推出独角兽?您的独角兽配置文件​​中有什么(如果存在)?

标签: ruby-on-rails unicorn


【解决方案1】:

不带-D(守护程序模式)启动独角兽,您的终端将保持连接到控制台。这应该提供更多关于崩溃原因的输出。

【讨论】:

    【解决方案2】:

    Unicorn 配置经常重定向 stdout 和 stderr。查看log/unicorn.rb 了解异常详情。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-08-19
      • 1970-01-01
      • 2011-08-29
      • 2012-08-10
      • 1970-01-01
      相关资源
      最近更新 更多