Phusion 乘客进程死亡,新进程神秘启动

Phusion 乘客进程死亡,新进程神秘启动

正如您所看到的,尽管我们自己并没有明确重启乘客,但乘客进程正在死亡,新的进程正在启动。我们无法确定是什么原因造成的。我们应该查看哪些常见的地方来找出触发这些重启的原因?

这些passenger-status命令发出的时间间隔约为 30 分钟。passenger_pool_idle_time在我们的配置文件中设置为 0,您可以在此处看到:https://gist.github.com/panabee/8ddf95a72d6a07e29c7f

我们使用的是 Passenger 4.0.5、Rails 3.2.12 和 nginx 1.4.1。

[root@mongo ~]# passenger-status
----------- General information -----------
Max pool size : 20
Processes     : 3
Requests in top-level queue : 0

----------- Application groups -----------
/home/p/p#default:
  App root: /home/p/p
  Requests in queue: 0
  * PID: 17171   Sessions: 0       Processed: 536     Uptime: 27m 56s
    CPU: 0%      Memory  : 62M     Last used: 20s ago
  * PID: 18087   Sessions: 0       Processed: 363     Uptime: 17m 31s
    CPU: 0%      Memory  : 36M     Last used: 39s ago
  * PID: 19382   Sessions: 0       Processed: 51      Uptime: 2m 55s
    CPU: 0%      Memory  : 34M     Last used: 5s ago

[root@mongo ~]# passenger-status
----------- General information -----------
Max pool size : 20
Processes     : 2
Requests in top-level queue : 0

----------- Application groups -----------
/home/p/p#default:
  App root: /home/p/p
  Requests in queue: 0
  * PID: 25266   Sessions: 0       Processed: 73      Uptime: 2m 56s
    CPU: 0%      Memory  : 32M     Last used: 34s ago
  * PID: 25462   Sessions: 1       Processed: 18      Uptime: 51s
    CPU: 0%      Memory  : 28M     Last used: 0s ago

[root@mongo ~]#

config.ru:

[root@newvps Tekiki]# cat config.ru
# This file is used by Rack-based servers to start the application.

require ::File.expand_path('../config/environment',  __FILE__)
run Tekiki::Application

答案1

这是 4.0.5 中的一个错误,将在 4.0.6 中修复。同时,将 pool_idle_time 设置为较大的值。

相关内容