python - Trouble killing celery process -


i have django project on ubuntu ec2 node, have been using set asynchronous using celery.

i following http://michal.karzynski.pl/blog/2014/05/18/setting-up-an-asynchronous-task-queue-for-django-using-celery-redis/ along docs.

i've been able basic task working @ command line, using:

(env1)ubuntu@ip-172-31-22-65:~/projects/tp$ celery --app=myproject.celery:app worker --loglevel=info 

to start worker. have since made changes python, realized need restart worker.

following how stop celery worker process , i've tried:

(env1)ubuntu@ip-172-31-22-65:~/projects/tp$ ps aux|grep 'celery worker' ubuntu    2033  0.0  0.0  10460   940 pts/11   s+   15:31   0:00 grep --color=auto celery worker (env1)ubuntu@ip-172-31-22-65:~/projects/tp$ sudo kill -9 2033 (env1)ubuntu@ip-172-31-22-65:~/projects/tp$ ps aux|grep 'celery worker' ubuntu    2085  0.0  0.0  10460   940 pts/11   s+   15:32   0:00 grep --color=auto celery worker (env1)ubuntu@ip-172-31-22-65:~/projects/tp$ sudo kill -9 2085 (env1)ubuntu@ip-172-31-22-65:~/projects/tp$ ps aux|grep 'celery worker' ubuntu    2129  0.0  0.0  10460   940 pts/11   s+   15:33   0:00 grep --color=auto celery worker 

i don't understand happening, seems new 1 created kill old process?

(env1)ubuntu@ip-172-31-22-65:~/projects/tp$ ps aux user       pid %cpu %mem    vsz   rss tty      stat start   time command root         1  0.0  0.5  36812  5972 ?        ss   mar18   0:02 /sbin/init root         2  0.0  0.0      0     0 ?        s    mar18   0:00 [kthreadd] root         3  0.0  0.0      0     0 ?        s    mar18   0:00 [ksoftirqd/0] root         4  0.0  0.0      0     0 ?        s    mar18   0:00 [kworker/0:0] root         5  0.0  0.0      0     0 ?        s<   mar18   0:00 [kworker/0:0h] root         6  0.0  0.0      0     0 ?        s    mar18   0:00 [kworker/u30:0] root         7  0.0  0.0      0     0 ?        s    mar18   0:01 [rcu_sched] root         8  0.0  0.0      0     0 ?        r    mar18   0:05 [rcuos/0] root         9  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuos/1] root        10  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuos/2] root        11  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuos/3] root        12  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuos/4] root        13  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuos/5] root        14  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuos/6] root        15  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuos/7] root        16  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuos/8] root        17  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuos/9] root        18  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuos/10] root        19  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuos/11] root        20  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuos/12] root        21  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuos/13] root        22  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuos/14] root        23  0.0  0.0      0     0 ?        s    mar18   0:00 [rcu_bh] root        24  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuob/0] root        25  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuob/1] root        26  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuob/2] root        27  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuob/3] root        28  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuob/4] root        29  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuob/5] root        30  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuob/6] root        31  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuob/7] root        32  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuob/8] root        33  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuob/9] root        34  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuob/10] root        35  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuob/11] root        36  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuob/12] root        37  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuob/13] root        38  0.0  0.0      0     0 ?        s    mar18   0:00 [rcuob/14] root        39  0.0  0.0      0     0 ?        s    mar18   0:00 [migration/0] root        40  0.0  0.0      0     0 ?        s    mar18   0:03 [watchdog/0] root        41  0.0  0.0      0     0 ?        s<   mar18   0:00 [khelper] root        42  0.0  0.0      0     0 ?        s    mar18   0:00 [kdevtmpfs] root        43  0.0  0.0      0     0 ?        s<   mar18   0:00 [netns] root        44  0.0  0.0      0     0 ?        s    mar18   0:00 [xenwatch] root        45  0.0  0.0      0     0 ?        s    mar18   0:00 [xenbus] root        46  0.0  0.0      0     0 ?        r    mar18   0:10 [kworker/0:1] root        47  0.0  0.0      0     0 ?        s<   mar18   0:00 [writeback] root        48  0.0  0.0      0     0 ?        s<   mar18   0:00 [kintegrityd] root        49  0.0  0.0      0     0 ?        s<   mar18   0:00 [bioset] root        50  0.0  0.0      0     0 ?        s<   mar18   0:00 [kworker/u31:0] root        51  0.0  0.0      0     0 ?        s<   mar18   0:00 [kblockd] root        52  0.0  0.0      0     0 ?        s<   mar18   0:00 [ata_sff] root        53  0.0  0.0      0     0 ?        s    mar18   0:00 [khubd] root        54  0.0  0.0      0     0 ?        s<   mar18   0:00 [md] root        55  0.0  0.0      0     0 ?        s<   mar18   0:00 [devfreq_wq] root        57  0.0  0.0      0     0 ?        s    mar18   0:00 [khungtaskd] root        58  0.0  0.0      0     0 ?        s    mar18   0:00 [kswapd0] root        59  0.0  0.0      0     0 ?        sn   mar18   0:00 [ksmd] root        60  0.0  0.0      0     0 ?        sn   mar18   0:02 [khugepaged] root        61  0.0  0.0      0     0 ?        s    mar18   0:00 [fsnotify_mark] root        62  0.0  0.0      0     0 ?        s    mar18   0:00 [ecryptfs-kthre root        63  0.0  0.0      0     0 ?        s<   mar18   0:00 [crypto] root        75  0.0  0.0      0     0 ?        s<   mar18   0:00 [kthrotld] root        76  0.0  0.0      0     0 ?        s    mar18   0:00 [kworker/u30:1] root        77  0.0  0.0      0     0 ?        s    mar18   0:00 [khvcd] root        78  0.0  0.0      0     0 ?        s    mar18   0:00 [scsi_eh_0] root        79  0.0  0.0      0     0 ?        s    mar18   0:00 [scsi_eh_1] root       100  0.0  0.0      0     0 ?        s<   mar18   0:00 [deferwq] root       101  0.0  0.0      0     0 ?        s<   mar18   0:00 [charger_manage root       142  0.0  0.0      0     0 ?        s<   mar18   0:00 [kpsmoused] root       203  0.0  0.0      0     0 ?        s    mar18   0:00 [jbd2/xvda1-8] root       204  0.0  0.0      0     0 ?        s<   mar18   0:00 [ext4-rsv-conve root       311  0.0  0.4 105628  4184 ?        ss   15:15   0:00 sshd: ubuntu [p ubuntu     370  0.0  0.1 105628  1884 ?        s    15:15   0:00 sshd: ubuntu@no root       371  0.0  0.2  67896  2200 ?        ss   15:15   0:00 sudo su - root       372  0.0  0.1  63248  1772 ?        s    15:15   0:00 su - root       373  0.0  0.1  19648  1792 ?        s    15:15   0:00 -su root       411  0.0  0.1  49592  1272 ?        ss   mar18   0:00 /lib/systemd/sy root       536  0.0  0.4 105628  4208 ?        ss   15:16   0:00 sshd: ubuntu [p root       582  0.0  0.2  10224  2912 ?        ss   mar18   0:00 dhclient -1 -v ubuntu     592  0.0  0.1 105628  1900 ?        s    15:16   0:00 sshd: ubuntu@pt ubuntu     593  0.0  0.4  22004  4612 pts/9    ss+  15:16   0:00 -bash root       627  0.0  0.4 105628  4216 ?        ss   15:16   0:00 sshd: ubuntu [p ubuntu     683  0.0  0.1 105764  1900 ?        s    15:16   0:00 sshd: ubuntu@pt ubuntu     685  0.0  0.4  22020  4628 pts/10   ss   15:16   0:00 -bash ubuntu     738  0.0  2.9 102296 29512 ?        s    mar24   0:06 uwsgi --ini uws ubuntu     742  0.0  2.4 102296 25152 ?        s    mar24   0:00 uwsgi --ini uws ubuntu     743  0.0  2.4 102296 25152 ?        s    mar24   0:00 uwsgi --ini uws ubuntu     744  0.0  2.4 102296 25152 ?        s    mar24   0:00 uwsgi --ini uws ubuntu     754  0.0  2.9 102368 29500 ?        s    mar24   0:06 uwsgi --ini uws ubuntu     758  0.0  2.4 102368 25148 ?        s    mar24   0:00 uwsgi --ini uws ubuntu     759  0.0  2.4 102368 25148 ?        s    mar24   0:00 uwsgi --ini uws ubuntu     760  0.0  2.4 102368 25148 ?        s    mar24   0:00 uwsgi --ini uws ubuntu     788  0.0  2.9 102344 29496 ?        s    mar24   0:06 uwsgi --ini uws ubuntu     792  0.0  2.4 102344 25144 ?        s    mar24   0:00 uwsgi --ini uws ubuntu     793  0.0  2.4 102344 25144 ?        s    mar24   0:00 uwsgi --ini uws ubuntu     794  0.0  2.4 102344 25144 ?        s    mar24   0:00 uwsgi --ini uws root       803  0.0  0.4 105628  4172 ?        ss   15:17   0:00 sshd: ubuntu [p ubuntu     854  0.0  2.9 102292 30088 ?        s    mar24   0:06 /home/ubuntu/.v ubuntu     861  0.0  0.1 105628  1880 ?        s    15:17   0:00 sshd: ubuntu@no ubuntu     864  0.0  0.0  12820   912 ?        ss   15:17   0:00 /usr/lib/openss message+   905  0.0  0.1  39224  1160 ?        ss   mar18   0:00 dbus-daemon --s root       925  0.0  0.1  43452  1608 ?        ss   mar18   0:00 /lib/systemd/sy syslog     984  0.0  1.1 260272 11820 ?        ssl  mar18   0:02 rsyslogd root      1025  0.0  0.0  14540   760 tty4     ss+  mar18   0:00 /sbin/getty -8 root      1028  0.0  0.0  14540   756 tty5     ss+  mar18   0:00 /sbin/getty -8 root      1032  0.0  0.0  14540   764 tty2     ss+  mar18   0:00 /sbin/getty -8 root      1033  0.0  0.0  14540   764 tty3     ss+  mar18   0:00 /sbin/getty -8 root      1035  0.0  0.0  14540   760 tty6     ss+  mar18   0:00 /sbin/getty -8 root      1069  0.0  0.2  61364  2904 ?        ss   mar18   0:04 /usr/sbin/sshd root      1092  0.0  0.0   4368   552 ?        ss   mar18   0:00 acpid -c /etc/a root      1093  0.0  0.0  23656   900 ?        ss   mar18   0:00 cron daemon    1094  0.0  0.0  19140   164 ?        ss   mar18   0:00 atd root      1101  0.0  0.1  85868  1384 ?        ss   15:20   0:00 nginx: master p www-data  1104  0.0  0.1  86176  1808 ?        s    15:20   0:00 nginx: worker p www-data  1105  0.0  0.1  86176  1808 ?        s    15:20   0:00 nginx: worker p www-data  1106  0.0  0.1  86176  1808 ?        s    15:20   0:00 nginx: worker p www-data  1107  0.0  0.2  86548  2648 ?        s    15:20   0:00 nginx: worker p ubuntu    1115  0.0  2.9 102348 30092 pts/10   s+   15:20   0:00 uwsgi --ini uws ubuntu    1120  0.0  3.4 109768 35000 pts/10   s+   15:20   0:00 uwsgi --ini uws ubuntu    1121  0.0  2.4 102348 25148 pts/10   s+   15:20   0:00 uwsgi --ini uws ubuntu    1122  0.0  3.4 109760 34956 pts/10   s+   15:20   0:00 uwsgi --ini uws root      1164  0.0  0.0  14540   768 tty1     ss+  mar18   0:00 /sbin/getty -8 root      1165  0.0  0.0  12788   724 ttys0    ss+  mar18   0:00 /sbin/getty -8 root      1268  0.0  0.0      0     0 ?        s    mar18   0:00 [kauditd] ubuntu    1549  0.0  3.3 108960 33780 ?        s    mar24   0:00 /home/ubuntu/.v ubuntu    1550  0.0  3.3 108960 33776 ?        s    mar24   0:00 /home/ubuntu/.v ubuntu    1551  0.0  2.4 102292 25144 ?        s    mar24   0:00 /home/ubuntu/.v root      1599  0.0  0.0  19472   384 ?        s    mar18   0:00 upstart-udev-br root      1602  0.0  0.0  15272   384 ?        s    mar18   0:00 upstart-file-br root      1605  0.0  0.0  15256   388 ?        s    mar18   0:00 upstart-socket- root      1842  0.0  0.4 105628  4220 ?        ss   15:30   0:00 sshd: ubuntu [p ubuntu    1899  0.0  0.1 105628  1900 ?        s    15:30   0:00 sshd: ubuntu@pt ubuntu    1901  0.0  0.4  21988  4596 pts/11   ss   15:30   0:00 -bash root      2210  0.0  0.3  62704  3100 ?        ss   15:34   0:00 sshd: [accepted sshd      2211  0.0  0.1  62704  1368 ?        s    15:34   0:00 sshd: [net] ubuntu    2212  0.0  0.1  17164  1324 pts/11   r+   15:34   0:00 ps aux ubuntu    3430  0.0  2.9 102288 30084 ?        s    mar25   0:04 /home/ubuntu/.v ubuntu    3457  0.0  2.4 102288 25140 ?        s    mar25   0:00 /home/ubuntu/.v ubuntu    3458  0.0  2.4 102288 25140 ?        s    mar25   0:00 /home/ubuntu/.v ubuntu    3459  0.0  2.4 102288 25140 ?        s    mar25   0:00 /home/ubuntu/.v redis     3932  0.0  0.7  38564  7116 ?        ssl  mar25   0:59 /usr/bin/redis- ubuntu    3963  0.0  2.9 102296 30092 ?        s    mar25   0:04 /home/ubuntu/.v ubuntu    4247  0.0  2.4 102296 25144 ?        s    mar25   0:00 /home/ubuntu/.v ubuntu    4248  0.0  2.4 102296 25144 ?        s    mar25   0:00 /home/ubuntu/.v ubuntu    4249  0.0  2.4 102296 25144 ?        s    mar25   0:00 /home/ubuntu/.v ubuntu    7360  0.0  2.9 102380 29508 ?        s    mar26   0:05 uwsgi --ini uws ubuntu    7364  0.0  3.3 109264 34044 ?        s    mar26   0:00 uwsgi --ini uws ubuntu    7365  0.0  3.3 109264 34044 ?        s    mar26   0:00 uwsgi --ini uws ubuntu    7366  0.0  3.3 109204 33864 ?        s    mar26   0:00 uwsgi --ini uws ubuntu   10272  0.0  2.9 102284 30076 ?        s    mar27   0:03 /home/ubuntu/.v ubuntu   13160  0.0  2.4 102284 25132 ?        s    mar27   0:00 /home/ubuntu/.v ubuntu   13161  0.0  2.4 102284 25132 ?        s    mar27   0:00 /home/ubuntu/.v ubuntu   13162  0.0  2.4 102284 25132 ?        s    mar27   0:00 /home/ubuntu/.v ubuntu   13875  0.0  2.9 102292 30088 ?        s    01:39   0:02 /home/ubuntu/.v ubuntu   13968  0.0  3.2 108332 33040 ?        s    03:56   0:00 /home/ubuntu/.v ubuntu   13969  0.0  2.4 102292 25144 ?        s    03:56   0:00 /home/ubuntu/.v ubuntu   13970  0.0  2.4 102292 25144 ?        s    03:56   0:00 /home/ubuntu/.v ubuntu   19155  0.0  2.6  84856 27160 ?        s    mar20   0:17 /home/ubuntu/.v ubuntu   19202  0.0  2.3  85248 23908 ?        s    mar20   0:00 /home/ubuntu/.v ubuntu   19203  0.0  2.2  84856 22444 ?        s    mar20   0:00 /home/ubuntu/.v ubuntu   19204  0.0  2.3  85248 23908 ?        s    mar20   0:00 /home/ubuntu/.v root     29838  0.0  0.4 105628  4176 ?        ss   14:43   0:00 sshd: ubuntu [p ubuntu   29919  0.0  0.1 105628  1880 ?        s    14:43   0:00 sshd: ubuntu@no root     29920  0.0  0.2  67896  2200 ?        ss   14:43   0:00 sudo su - root     29921  0.0  0.1  63248  1772 ?        s    14:43   0:00 su - root     29922  0.0  0.1  19648  1792 ?        s    14:43   0:00 -su root     30070  0.0  0.4 105628  4172 ?        ss   14:45   0:00 sshd: ubuntu [p ubuntu   30125  0.0  0.1 105628  1728 ?        s    14:45   0:00 sshd: ubuntu@no ubuntu   30126  0.0  0.0  12820   916 ?        ss   14:45   0:00 /usr/lib/openss root     30369  0.0  0.4 105628  4212 ?        ss   14:48   0:00 sshd: ubuntu [p ubuntu   30424  0.0  0.1 105764  1904 ?        s    14:48   0:00 sshd: ubuntu@pt ubuntu   30425  0.0  0.4  22020  4632 pts/7    ss   14:48   0:00 -bash root     30795  0.0  0.4 105628  4220 ?        ss   14:52   0:00 sshd: ubuntu [p ubuntu   30853  0.0  0.1 105628  1904 ?        s    14:52   0:00 sshd: ubuntu@pt ubuntu   30871  0.0  0.4  21896  4172 pts/8    ss+  14:52   0:00 -bash ubuntu   31044  0.0  2.9 102288 30092 pts/7    s+   14:53   0:00 uwsgi --ini uws ubuntu   31050  0.0  2.4 102288 25144 pts/7    s+   14:53   0:00 uwsgi --ini uws ubuntu   31051  0.0  2.4 102288 25144 pts/7    s+   14:53   0:00 uwsgi --ini uws ubuntu   31052  0.0  3.5 110276 35744 pts/7    s+   14:53   0:00 uwsgi --ini uws root     32412  0.0  1.1  53660 11228 ?        ss   mar24   0:42 /usr/bin/python (env1)ubuntu@ip-172-31-22-65:~/projects/tp$ 

if running celery worker

celery --app=myproject.celery:app worker --loglevel=info 

to kill process, ctrl + c


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -