django多进程uwsgi 流程
- 1、安装uwsgi
pip install uwsgi
- 2、配置启动文件(eg: uwsgi.ini)
[uwsgi]
http= 0.0.0.0:8889
# socket = 127.0.0.1:8001
# the base directory (full path)
chdir = /home/hilqiqi0/images_manger
# Django's wsgi file
wsgi-file = images_manage/wsgi.py
# maximum number of worker processes
processes = 8
#thread numbers startched in each worker process
threads = 2
#monitor uwsgi statu
stats = 127.0.0.1:9191
# clear environment on exit
vacuum = true
#
daemonize = /home/hilqiqi0/images_manger/uwsgi.log
- 3、启动uwsgi
uwsgi uwsgi.ini
- 4、关闭所有uwsgi启动的进程
pkill -f uwsgi -9