I can see that if I start uwsgi like this:
sudo /usr/local/bin/uwsgi --emperor /etc/uwsgi/vassals --uid www --gid www
it creates one emperor copy. But if I start it with --master
additionally (as recommended here), it creates two emperor copies. Does it make sense to use --master
with --emperor
? I would say no, but if I run it without that option I get this warning:
*** WARNING: you are running uWSGI without its master process manager ***
I'd like to add some specific information for using harakiri mode for vassals running under emperor. If master is not also in the config for the vassals harakiri will have no effect regardless of whether master/harakiri is specified in the emperor config. Given an example emperor config:
The vassals will need the following for harakiri to work:
Note that master and harakiri are both present in the vassal and setting them in emperor config would have no effect on the vassals for uwsgi version 2.0.12
I disagree - the documentation says it is not a good idea NOT to use it, in production anyway; I guess the double negative could be written more clearly.
Therefore it would appear it IS a good idea to use it, hence the warning.
Here is what official documentation says:
If you're wondering what
master
option does, here is the answer:So, to summarize:
--master
for usual uWSGI instance,--master
for uWSGI Emperor.