Unicorn / Capistrano,Post部署Unicorn工作人员的新PID,应用程序没有刷新

时间:2014-04-23 06:15:19

标签: ruby-on-rails capistrano unicorn

所以我设置了独角兽重新开始在capistrano 3上进行部署。它告诉我它重新启动好了,它为工作人员提供了新的PID,但是当我刷新应用程序时没有变化?

  • 我做了一个简单的测试,并在视图中更改了一个小项目。
  • 如果我做了#34;重启"在服务器上,它没有提取更改。
  • 如果我在服务器上手动停止/启动独角兽,它会接收更改。
  

INFO [528d1d0f]以0.023秒结束,退出状态为0   (成功)。            INFO [a114fafd]运行/ usr / bin / env sudo /etc/init.d/unicorn_salescrm_production restart on   salescrm.mydomain.com           DEBUG [a114fafd]命令:(RBENV_ROOT = / home / deploy / .rbenv RBENV_VERSION = 2.1.0 / usr / bin / env sudo   /etc/init.d/unicorn_salescrm_production restart)           DEBUG [a114fafd]重新加载好了

    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$

1 个答案:

答案 0 :(得分:1)

/etc/init.d/unicorn_salescrm_production用于重启的信号是什么?例如,如果您设置preload = true,则应使用USR2代替HUP进行重启。 http://unicorn.bogomips.org/SIGNALS.html