Open garethrees opened 9 years ago
This is still reproducible on Ubuntu 18.04 LTS (while Thin process is running):
imamopravoznati:/var/www/imamopravoznati.org/alaveteli$ sudo /etc/init.d/alaveteli restart
Restarting Alaveteli app server: Traceback (most recent call last):
9: from /home/alaveteli/bundle/ruby/2.5.0/bin/thin:23:in `<main>'
8: from /home/alaveteli/bundle/ruby/2.5.0/bin/thin:23:in `load'
7: from /home/alaveteli/bundle/ruby/2.5.0/gems/thin-1.8.1/bin/thin:6:in `<top (required)>'
6: from /home/alaveteli/bundle/ruby/2.5.0/gems/thin-1.8.1/lib/thin/runner.rb:159:in `run!'
5: from /home/alaveteli/bundle/ruby/2.5.0/gems/thin-1.8.1/lib/thin/runner.rb:203:in `run_command'
4: from /home/alaveteli/bundle/ruby/2.5.0/gems/thin-1.8.1/lib/thin/controllers/controller.rb:103:in `restart'
3: from /home/alaveteli/bundle/ruby/2.5.0/gems/thin-1.8.1/lib/thin/controllers/controller.rb:135:in `tail_log'
2: from /home/alaveteli/bundle/ruby/2.5.0/gems/thin-1.8.1/lib/thin/controllers/controller.rb:104:in `block in restart'
1: from /home/alaveteli/bundle/ruby/2.5.0/gems/thin-1.8.1/lib/thin/daemonizing.rb:127:in `restart'
/home/alaveteli/bundle/ruby/2.5.0/gems/thin-1.8.1/lib/thin/daemonizing.rb:148:in `send_signal': Can't stop process, no PID found in tmp/pids/thin.pid (Thin::PidFileNotFound)
alaveteli.
To confirm Thin process is running:
imamopravoznati:/var/www/imamopravoznati.org/alaveteli$ pgrep -u alaveteli | tail -n 1
27913
In this case, Thin PID is "27913".
Thin PID is correctly stored:
imamopravoznati:/var/www/imamopravoznati.org/alaveteli/tmp/pids$ less thin.3000.pid
27913
But it seems restart daemon is trying to fetch a thin pid from different file: "Can't stop process, no PID found in tmp/pids/thin.pid (Thin::PidFileNotFound)" --> tmp/pids/thin.pid instead of "tmp/pids/thin.3000.pid"
That's strange. We rely on thin to know how to restart itself. Maybe this is a known bug with thin? I don't think it's anything we're doing.
FWIW, we're looking at moving to puma, as that's now Rails' default application server.