What signal does this /etc/init.d/unicorn_salescrm_production
use for restart?. For example, if you set preload = true
, you should use USR2
instead of HUP
for restart. http://unicorn.bogomips.org/SIGNALS.html
Unicorn / Capistrano, Post deploy Unicorn workers on new PID, app not refreshing
-
07-07-2023 - |
题
So I've setup unicorn to restart post deploy on capistrano 3. It tells me it restarted OK, it has new PID's for workers, but when I refresh the app no change?
- I did a simple test and changed a small item in the view.
- If I do a "restart" on the server, it doesn't pickup the change.
- If I manually stop / start unicorn on the server it picks up the change.
INFO [528d1d0f] Finished in 0.023 seconds with exit status 0 (successful). INFO [a114fafd] Running /usr/bin/env sudo /etc/init.d/unicorn_salescrm_production restart on salescrm.mydomain.com DEBUG [a114fafd] Command: ( RBENV_ROOT=/home/deploy/.rbenv RBENV_VERSION=2.1.0 /usr/bin/env sudo /etc/init.d/unicorn_salescrm_production restart ) DEBUG [a114fafd] reloaded OK
deploy@ip-172-31-10-178:~/salescrm_production/current$ ps aux | grep unicorn
deploy 6748 0.6 0.8 714104 136204 ? Sl 05:00 0:10 unicorn master -D -c /home/deploy/salescrm_production/current/config/unicorn.rb -E production
deploy 7741 0.2 0.8 720872 137472 ? Sl 05:23 0:00 unicorn worker[1] -D -c /home/deploy/salescrm_production/current/config/unicorn.rb -E production
deploy 7747 0.3 0.9 723708 140324 ? Sl 05:23 0:00 unicorn worker[0] -D -c /home/deploy/salescrm_production/current/config/unicorn.rb -E production
deploy 7750 0.4 0.9 727468 144300 ? Sl 05:23 0:00 unicorn worker[2] -D -c /home/deploy/salescrm_production/current/config/unicorn.rb -E production
deploy 7755 0.3 0.8 717292 134252 ? Sl 05:23 0:00 unicorn worker[3] -D -c /home/deploy/salescrm_production/current/config/unicorn.rb -E production
deploy 7857 0.0 0.0 8112 928 pts/0 S+ 05:27 0:00 grep unicorn
deploy@ip-172-31-10-178:~/salescrm_production/current$ ps aux | grep unicorn
deploy 6748 0.6 0.8 714104 136232 ? Sl 05:00 0:10 unicorn master -D -c /home/deploy/salescrm_production/current/config/unicorn.rb -E production
deploy 7977 2.0 0.8 715132 131960 ? Sl 05:27 0:00 unicorn worker[3] -D -c /home/deploy/salescrm_production/current/config/unicorn.rb -E production
deploy 7980 2.0 0.8 715132 131964 ? Sl 05:27 0:00 unicorn worker[0] -D -c /home/deploy/salescrm_production/current/config/unicorn.rb -E production
deploy 7986 2.0 0.8 715132 131960 ? Sl 05:27 0:00 unicorn worker[1] -D -c /home/deploy/salescrm_production/current/config/unicorn.rb -E production
deploy 7990 2.0 0.8 715132 131960 ? Sl 05:27 0:00 unicorn worker[2] -D -c /home/deploy/salescrm_production/current/config/unicorn.rb -E production
deploy 8005 0.0 0.0 8112 928 pts/0 S+ 05:28 0:00 grep unicorn
deploy@ip-172-31-10-178:~/salescrm_production/current$
解决方案
不隶属于 StackOverflow