码迷,mamicode.com
首页 > 系统相关 > 详细

linux 优雅的退出/关闭/重启gunicorn进程

时间:2018-04-23 18:37:13      阅读:547      评论:0      收藏:0      [点我收藏+]

标签:ref   www.   新建   htm   地址   pstree   获取   web服务   无法   

在工作中,会发现gunicorn启动的web服务,无论怎么使用kill -9 进程号都是无法杀死gunicorn,经过我一番百度和谷歌,发现想要删除gunicorn进程其实很简单。

第一步获取Gunicorn进程树:

通过执行如下命令,可以获取Gunicorn进程树:

pstree -ap|grep gunicorn

得到的结果如下:
技术分享图片

重启Gunicorn任务

kill -HUP 85898

3. 退出Gunicorn任务

kill -9 74430

执行上述命令后,再次执行“pstree -ap|grep gunicorn”,我们很容易发现,除了主进程,其他的Gunicorn进程都已经销毁,并新建了进程(进程ID发生了变化)。




本文地址:http://www.chenxm.cc/post/573.html

linux 优雅的退出/关闭/重启gunicorn进程

标签:ref   www.   新建   htm   地址   pstree   获取   web服务   无法   

原文地址:https://www.cnblogs.com/lowenve/p/8920489.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!