我使用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,但有时候它并没有。这是什么意思?
谢谢!
答案 0 :(得分:1)
我有同样令人讨厌的问题
我发现如果服务器在启动时崩溃,则会创建pid文件,但文件中没有pid。尝试使用服务器./logs/thin.3001.log的日志文件并查找错误。您也可以尝试通过
手动启动服务器rails s -p 3000
并查看是否有任何错误被抛出。
祝你好运克里斯