怎样重启Gunicorn
来源:互联网 发布:广西广电网络营业厅 编辑:程序博客网 时间:2024/04/27 18:33
1. 寻找masterpid
通过执行如下命令,可以获取Gunicorn进程树:
pstree -ap|grep gunicorn
得到如下的结果。
|-grep,6194 --col gunicorn | `-gunicorn,30080 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py | |-gunicorn,4413 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py | |-gunicorn,8030 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py | |-gunicorn,8135 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py | |-gunicorn,8137 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py | |-gunicorn,11532 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py | |-gunicorn,13460 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py | |-gunicorn,19728 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py | |-gunicorn,23585 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py | |-gunicorn,23825 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py | |-gunicorn,27921 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py | |-gunicorn,28899 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py | |-gunicorn,28900 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py | |-gunicorn,28901 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py | |-gunicorn,35637 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py | |-gunicorn,36963 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py | |-gunicorn,43074 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py | |-gunicorn,43118 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py | |-gunicorn,43232 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py | |-gunicorn,43307 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py | |-gunicorn,43308 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py | |-gunicorn,44018 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py | |-gunicorn,46996 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py | |-gunicorn,47000 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py | `-gunicorn,47650 /usr/local/bin/gunicorn collect:app -c collect_gunicorn.py
很显然,30080就是Gunicorn的主进程。
2. 重启Gunicorn任务
按照官方的推荐方法,很容易执行命令:
# 不需要sudokill -HUP 30080
执行上述命令后,再次执行“pstree -ap|grep gunicorn”,我们很容易发现,除了主进程,其他的Gunicorn进程都已经销毁,并新建了进程(进程ID发生了变化)。
阅读全文
0 0
- 怎样重启Gunicorn
- 怎样重启mysql服务器
- windows server2012怎样关机怎样重启-详细教程
- win2003 怎样重启oracle数据库
- 怎样重启WinForm/WPF程序
- php5.4.6怎样重启php-fpm
- 怎样设置才能关闭Win7系统自动更新重启提示
- [系统教程] 怎样使用命令行重启Mac [复制链接]
- 怎样启动 停止 重启MySQL数据库服务器
- struts2中怎样做不用重启tomcat
- gunicorn配置文件
- gunicorn timeout
- gunicorn 简介
- gunicorn常用命令
- 体内湿气重怎样祛除?
- 体内湿气重怎样祛除
- 体内湿气重怎样祛除
- 怎样进行网页重定向
- 2017 哈理工低年级组院赛初赛 H-魔法阵 【规律】
- 离线markdown编辑器Haroopad介绍
- 你所不知道的HTTP
- 基于Vue移动音乐webapp跨域获取QQ音乐歌单接口
- mysql 中any,some,all,in的用法
- 怎样重启Gunicorn
- Linux工作队列
- 第46天 JavaScript(1)
- Expert Oracle Application Express.pdf 英文原版 免费下载
- windows配置hadoop遇到的问题(分布式缓存)
- C++程序编译运行后窗口一闪而过问题
- tensorboard_还出现报错,找不到流_先跳过
- poj 3723 Conscription (并查集)
- Unable to execute dex: Multiple dex files define Lcom/baidu/a/a/a/a;