0

I have a uWSGI setup where I run dynamic mode and add applications to it. All applications are working off the same codebase, but each have their own settings file. Its working beautifully.

Say for instance, i want to change a setting for one app that has already been loaded. Is there a way I can get uwsgi to reload the app, rather than restarting the whole uwsgi server? In emperor mode I could just touch the config file. How do I achieve the equivalent result in dynamic mode?

Gevious
  • 465
  • 4
  • 9

1 Answers1

1

Unfortunately you can't. Destroying a Python subinterpreter (as well as Perl or Lua), is a pretty weak operation that cannot free lot of things leading to very poor results.

For example C-based shared python modules cannot be safely freed (as other interpreters could have reference to them) as well as more os-related problems like opened file descriptors and similar.

The best thing you can do is reloading workers (using chain-reload tricks to reduce downtime).

Pay attention: you only need to reload workers, not the whole instance

roberto
  • 1,827
  • 12
  • 8