uWSGI: --master with --emperor spawns two emperors

后端 未结 3 1122
情书的邮戳
情书的邮戳 2020-12-13 06:58

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 empero

3条回答
  •  臣服心动
    2020-12-13 07:25

    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:

    [uwsgi]
    emperor = ...
    daemonize = ...
    emperor-pidfile = ...
    vassal-set = enable-metrics=1
    emperor-stats = 127.0.0.1:6000
    

    The vassals will need the following for harakiri to work:

    [uwsgi]
    strict
    processes = 4
    stats = 127.0.0.1:5000
    memory-report
    daemonize = ...
    pidfile = ...
    close-on-exec
    py-tracebacker = /tmp/tbsocket
    master
    harakiri = 5
    harakiri-verbose
    

    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

提交回复
热议问题