简体   繁体   English

Unicorn / Capistrano,Post在新PID上部署Unicorn工作者,应用程序不刷新

[英]Unicorn / Capistrano, Post deploy Unicorn workers on new PID, app not refreshing

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? 因此,我设置了独角兽以在capistrano 3上重新启动部署后的操作。它告诉我它已重新启动,它为工作人员提供了新的PID,但是当我刷新应用程序时,没有变化吗?

  • 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 [528d1d0f]在0.023秒内完成,退出状态为0(成功)。 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 INFO [a114fafd]在salescrm.mydomain.com上运行/ usr / bin / env sudo /etc/init.d/unicorn_salescrm_production重新启动DEBUG [a114fafd]命令:(RBENV_ROOT = / home / deploy / .rbenv RBENV_VERSION = 2.1.0 / usr / bin / env sudo /etc/init.d/unicorn_salescrm_production重新启动)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$

What signal does this /etc/init.d/unicorn_salescrm_production use for restart?. /etc/init.d/unicorn_salescrm_production用于重启的信号是什么? For example, if you set preload = true , you should use USR2 instead of HUP for restart. 例如,如果设置preload = true ,则应使用USR2而不是HUP来重新启动。 http://unicorn.bogomips.org/SIGNALS.html http://unicorn.bogomips.org/SIGNALS.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM