How to stop the uWSGI server after it starts?

I have a pyramid python application that I run using uwsgi, for example:

 sudo /finance/finance-env/bin/uwsgi --ini-paste-logged /finance/corefinance/production.ini

As soon as it starts and my window expires, I cannot stop the server without restarting the entire field. How to stop the server?

+4
source share
2 answers

You can kill uwsgiusing standard Linux commands:

killall uwsgi

or

# ps ax|grep uwsgi
12345
# kill -s QUIT 12345

The last command allows you to perform a graceful reboot or immediately kill the entire stack , depending on the signal you send .

: , , . :) Uwsgi docs / Upstart/Systemd.

, uwsgi root - sudo , , uid/gid production.ini, Uwsgi . - root .

+2

-pidfile

 sudo /finance/finance-env/bin/uwsgi --ini-paste-logged /finance/corefinance/production.ini --pidfile=/tmp/finance.pid

sudo /finance/finance-env/bin/uwsgi --stop /tmp/finance.pid

 sudo /finance/finance-env/bin/uwsgi --reload /tmp/finance.pid
+3

Source: https://habr.com/ru/post/1651194/


All Articles