本站因为流量越来越多,我也使用上 Gunicorn 作为 Nginx 和 Flask 之间的中间件了,否则 Flask 自带的测试服务器实在是无法抗的下如此大的流量。
Gunicorn
Nginx
Flask
启动相比不需要过多讲了,配置好 conf 文件,使用以下命令即可启动。
conf
gunicorn -c gunicorn.py app:app
使用 pstree 查询进程树。
pstree -ap|grep gunicorn
返回应该如下所示:
root@web-dev:~/# pstree -ap|grep gunicorn |-gunicorn,3970631 /usr/bin/gunicorn -c gunicorn.py app:app | |-gunicorn,3971828 /usr/bin/gunicorn -c gunicorn.py app:app | |-gunicorn,3971829 /usr/bin/gunicorn -c gunicorn.py app:app | |-gunicorn,3971830 /usr/bin/gunicorn -c gunicorn.py app:app | `-gunicorn,3971831 /usr/bin/gunicorn -c gunicorn.py app:app | | |-grep,3972703 --color=auto gunicorn
3970631 就是 Gunicorn 的进程 ID。
3970631
使用 kill -HUP 带上 进程ID 即可重启进程。
kill -HUP
kill -HUP 3970631
执行上述命令后,再次执行“pstree -ap|grep gunicorn”,我们很容易发现,除了主进程,其他的Gunicorn进程都已经销毁,并新建了进程(进程ID发生了变化)。
kill -9 3970631
使用 OpenAi Api 绕开网页版访问限制。
GoodSync 是一个 文件同步 和 文件备份 的软件
关于自建搜索引擎的一些介绍和原因
这样一顿操作后,我终于可以在家里使用公司的网络上网了。
本文将教你如何将现有的IPFS从0.4.23升级到0.5。
目录
热门标签
更多语言
站点信息