Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make uwsgi --emperor run as daemon

Tags:

daemon

uwsgi

I'm using yaml. It has a line says : daemonize : /var/www/apps/myapp.log

If uwsgi -y vassals/myappconfig.yaml, the website runs in background. I can do other things in terminal, even logout. This is the effect I'm expecting.

If uwsgi --emperor vassals, the website can run, but it stuck up in terminal. I must use ctrl + c to end it to return to terminal. Then the website is down. That's not what I'm expecting.

I don't want to use things like nohup. If uwsgi --emperor is not the right solution, I'd rather to load websites one by one, all run daemonized.

like image 393
hbrls Avatar asked May 29 '12 09:05

hbrls


People also ask

How to stop uWSGI process?

If you have the uWSGI process running in the foreground for some reason, you can just hit CTRL+C to kill it off.

What is Emperor uWSGI?

It is a special uWSGI instance that will monitor specific events and will spawn/stop/reload instances (known as vassals, when managed by an Emperor) on demand. By default the Emperor will scan specific directories for supported (. ini, .


1 Answers

you can pass --daemonize <logfile> to the emperor too

like image 139
roberto Avatar answered Nov 06 '22 14:11

roberto