5
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

kill -QUIT `cat tmp/pids/unicorn.pidでUnicornを停止できない~~

Last updated at Posted at 2019-03-29

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を停止。

これできっとうまくいくと思われます

5
8
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
5
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?