unicornのプロセスに問題があるから、停止させたい!
でもkill -QUITcat tmp/pids/unicorn.pidでできない場合
できない理由は、capistarnoを導入したり、その他ディレクトリ・プロセスを管理するためのパッケージを導入すると、
unicorn.pidの所属するディレクトリが別の場所に移ってしまうため、 できない
なのでまずは
terminal
$ ps aux | grep unicorn
//プロセス番号を調べる
terminal
//実行結果
[ex2-usr@ip-***-**-**-*** ~]$ps aux | grep unicorn
ec2-user 5077 18.3 11.1 409700 113312 ? s1 07:09 0:02 unicorn master -c ~~~~
ec2-user 5135 0.0 9.8 409700 100572 ? s1 07:09 0:00 unicorn worker[0] -c ~~~~
ec2-user 5135 0.0 0.1 110484 2024 pts/0 s+ 07:09 0:00 grep --color=auto unicorn
ps aux | grep unicornコマンドの実行結果のうち、unicorn masterと表示されているプロセスが対象のプロセスなのです。
terminal
$ kill -9 5077(<=今回の場合は5077)
で調べたプロセス番号を使って、Unicornを停止。
これできっとうまくいくと思われます