3

我正在使用 Nginx Web 服务器和 5 个瘦应用服务器在 Ubuntu 上运行 Rails。

一天一次,系统变得非常缓慢,有时会挂起。

我不确定它是否是瘦服务器,但是当我在服务器挂起时停止服务器时,我得到:

Can't stop process, no PID found in tmp/pids/thin.3000.pid

这是显示瘦启动和停止的日志:

bitnami@linux:/opt/bitnami$ thin -C projects/myapp/current/config/thin.yml start
Starting server on 127.0.0.1:3000 ...
Starting server on 127.0.0.1:3001 ...
Starting server on 127.0.0.1:3002 ...
Starting server on 127.0.0.1:3003 ...
Starting server on 127.0.0.1:3004 ...


bitnami@linux:/opt/bitnami$ thin -C projects/myapp/current/config/thin.yml stop
Stopping server on 127.0.0.1:3000 ...
Sending QUIT signal to process 21921 ...
>> Exiting!
Timeout!
Can't stop process, no PID found in tmp/pids/thin.3000.pid
Stopping server on 127.0.0.1:3001 ...
Sending QUIT signal to process 21945 ...
>> Exiting!
Timeout!
Can't stop process, no PID found in tmp/pids/thin.3001.pid
Stopping server on 127.0.0.1:3002 ...
Sending QUIT signal to process 21969 ...
>> Exiting!
Timeout!
Can't stop process, no PID found in tmp/pids/thin.3002.pid
Stopping server on 127.0.0.1:3003 ...
Sending QUIT signal to process 21993 ...
Timeout!
Sending KILL signal to process 21993 ...
Stopping server on 127.0.0.1:3004 ...
Sending QUIT signal to process 22017 ...
>> Exiting!
bitnami@linux:/opt/bitnami$

有时它会发现 PIDS,有时却没有。这是什么意思?

谢谢!

4

1 回答 1

1

我有完全相同的烦人问题

我发现如果服务器在启动时崩溃,会创建 pid 文件但文件中没有 pid。尝试查找服务器的日志文件 ./logs/thin.3001.log 并查找错误。您也可以尝试通过手动启动服务器

rails s -p 3000

看看是否有任何错误抛出。

祝你好运

克里斯

于 2013-09-06T16:09:23.077 回答