I run uWSGI in Emperor mode. Everything is fine and works but if i add a new myapplication.ini uWSGI needs minutes to hours bevor recognize the change and starts a new app. The Documentation says nothing about a timing or monitoring frequenc setting. So any Ideas to investigate this problem?

uwsgi 2.0.16 on FreeBSD 11.2-RELEASE-p8

uwsgi --master --emperor /usr/local/etc/uwsgi-apps --uid www --gid www

14:30 I copy myapplication.ini to the Conf directory


[uWSGI] getting INI configuration from myapplication.ini
Thu Jan 17 16:38:42 2019 - [emperor] vassal myapplication.ini has been spawned
Thu Jan 17 16:38:42 2019 - [emperor] vassal myapplication.ini is ready to accept requests
Thu Jan 17 18:25:53 2019 - [emperor] vassal myapplication.ini is now loyal

Default scan frequency is 3 seconds, you can set it with --emperor-freq. From uwsgi-docs:

argument: required_argument
parser: uwsgi_opt_set_int
help: set the Emperor scan frequency (default 3 seconds)

You have in uwsgi log

[uWSGI] getting INI configuration from myapplication.ini

and that means emperor loads your application. This log must be seen immediately after you copy .ini config file to the conf directory.
Time from this log to log "...has been spawned..." is spend by your application until return uwsgi object.

Some other notes:
- In general, you don't need --master when you using --emperor.
- You can set uwsgi with emperor on FreeBSD as service in rc.conf with "uwsgi_enalbe=YES", "uwsgi_emperor=YES" and "uwsgi_vassals_dir=your_vassals_directory"

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.