如何退出 uwsgi 服务器进程

如何退出 uwsgi 服务器进程

我正在尝试使用以下方法为 django 设置 uWSGIhttp://adambard.com/blog/start-to-finish-serving-mysql-backed-django-w/以及教程http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html。按照我的指示:

(env1)ubuntu@ip-172-31-28-196:~$ ls
host_type.py  requirements.txt  test.py  tproxy
(env1)ubuntu@ip-172-31-28-196:~$ sudo chmod 666 test.py
(env1)ubuntu@ip-172-31-28-196:~$ uwsgi --http :8000 --wsgi-file test.py
*** Starting uWSGI 2.0.9 (64bit) on [Tue Mar  3 14:45:58 2015] ***
compiled with version: 4.8.2 on 03 March 2015 02:58:28
os: Linux-3.13.0-44-generic #73-Ubuntu SMP Tue Dec 16 00:22:43 UTC 2014
nodename: ip-172-31-28-196
machine: x86_64
clock source: unix
detected number of CPU cores: 1
current working directory: /home/ubuntu
detected binary path: /home/ubuntu/.virtualenvs/env1/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 7862
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
probably another instance of uWSGI is running on the same address (:8000).
bind(): Address already in use [core/socket.c line 764]

如你所见,有另一个 uWSGI 实例正在运行。我该如何停止它?

答案1

您可以使用以下方法停止它:

sudo fuser -k 8000/tcp

这将终止端口 8000 上的进程

相关内容