Saturday, August 25, 2018

uWSGI Emperor does not reload Vassal by touching the .ini file

Leave a Comment

I have multiple uWSGI vassals, all monitored by uwsgi emperor. I update the code for my app (Django) and I want the emperor to perform a clean reload of one of the vassals. To do that I

touch vassal-foo.ini 

In the logs I see [emperor] reload the uwsgi instance vassal-foo.ini. This sounds promising, but the app is not reloaded. It continues to run the old version. Checking the process (PID) startup time, indeed, it has not been restarted.

Any hints what might cause this? Few things that might be uncommon:

  • Neither the emperor nor the vassal run in master mode
  • Emperor was installed with pip and runs under initctl
  • kill -9-ing the vassal triggers a correct reload (obviously)
  • I use symlinks
  • I have a secondary thread inside my python app (threading.Thread(target).start()) running with daemon=True

Things I tried and did not work:

  • Run the process without any additional threads (remove threading.Thread(target).start())
  • Touching with touch --no-dereference vassal-foo.ini
  • Starting emperor with --emperor-nofollow

vassal-foo.ini:

master         = false processes      = 1 thunder-lock   = true enable-threads = true socket         = /tmp/%n.sock chmod-socket    = 666 vacuum          = true 

Emperor:

exec /tmp/uwsgi --emperor /tmp/configs/uwsgi/ --die-on-term --uid me --gid me --logto /tmp/logs/uwsgi-emperor.log 

uWSGI version

$ uwsgi --version 2.0.17 

0 Answers

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment