質問

I'm running Rails on Ubuntu using Nginx web server and 5 Thin app servers.

Once a day the system gets very slow and sometimes hangs-up.

I'm not sure if it's the Thin servers, but when I stop the servers when it's hung, I get:

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

Here is the log showing the Thin start and stop:

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$

Sometimes it finds PIDS other times it doesn't. What does this mean?

Thanks!

役に立ちましたか?

解決

I had exactly the same annoying problem

I've found that if the server crashes on startup, the pid file gets created but there is no pid in the file. Try cat'ing the log file for the server ./logs/thin.3001.log and look for errors. You could also try starting the server manually via

rails s -p 3000

and see if there are any errors thrown.

Good luck

Chris

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top