LoginSignup
2
0

More than 5 years have passed since last update.

OpsworksでRailsの変更が反映されない

Posted at

背景

masterに変更を加えてopsworksからデプロイしたのに、何故が変更が反映されていませんでした。

デプロイのstatusはsuccessfulになっているのに、どうして?・・・

おそらくの原因

詳しくはわかっていませんが、unicornの古いプロセスがそのまま動いていました。

てっきり削除されるものかと思ったんですが、何故こいつが生きていたのかは不明です。

対応方法

何はともあれ古いプロセスを削除しました。

$ ps aux | grep unicorn
deploy   11111  0.7  6.5 1111111 111111 ?      Sl   17:56   0:03 unicorn_rails master --env production --daemonize -c /srv/www/xxxxxxxx/shared/config/unicorn.conf
deploy   12222  3.3  9.8 1222222 222222 ?      Sl   18:02   0:03 unicorn_rails worker[1] --env production --daemonize -c /srv/www/xxxxxxxx/shared/config/unicorn.conf
deploy   13333  2.2  7.3 1333333 333333 ?      Sl   18:02   0:02 unicorn_rails worker[0] --env production --daemonize -c /srv/www/xxxxxxxx/shared/config/unicorn.conf
deploy   14444  0.0  0.1 1444444  9999 pts/3    S+   18:04   0:00 grep --color=auto unicorn
$ kill -QUIT 11111

そのあとにunicornを再起動しました。

$ /srv/www/xxxxxxx/shared/scripts/unicorn restart

これで解決しました。
ちゃんと変更が反映されました。


備忘録として残しておきます。
もし同じような現象に悩む人の役に立つことを祈ります。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0