Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reloading configuration without restart #55

Closed
prymitive opened this issue Nov 20, 2012 · 4 comments
Closed

Reloading configuration without restart #55

prymitive opened this issue Nov 20, 2012 · 4 comments

Comments

@prymitive
Copy link
Contributor

Right now any change in vassal config will cause its restart but some options could be changed without that, for example --max-requests or --cron. I guess that this would require big changes in options handling (like adding requires restart flag to option definition or so) and I don't really need it right away, but it would be great if uWSGI could eventually have such feature.

@akx
Copy link
Contributor

akx commented Nov 20, 2012

This sounds like something that might extend the ManagementFlag interface? http://projects.unbit.it/uwsgi/wiki/ManagementFlag

(Yes, yes, I know, sorry -- ManagementFlag hasn't been ported to the new docs yet :D)

@unbit
Copy link
Owner

unbit commented Nov 20, 2012

i think the whole management flag subsystem should be rewritten to support more (all ?) parameters.
Maybe the simplest choice is changing it to be more "string" based, so each re-configure packet could be a simple list of key-value items. The uwsgi_option flag field should take an additional flag marking ONTHEFLY options (the ones that could be changed without reload). After having such a system, implementing a config-update system should be extremely easy and fast.

Example:

{'max-requests':'1000', 'harakiri':'40'} => will update both max-requests and harakiri without taking down the instance

while

{'sockets':'/tmp/foobar'} => is not an onthefly option and it will be ignored

@prymitive
Copy link
Contributor Author

Adding possibility to update all settings on-the-fly would require massive changes to whole code base, and forkish nature of uWSGI will make it tricky.
Example: caches are initialized in the master on startup and we can't change them after workers are forked since workers will have different configuration than master.

I've added it to 2.0 milestone, IMHO we should try to come up with a better solution for this during 2.0 development (when there is possibility to make backward incompatible changes if needed) and once there is a way of doing this in the core, we can start migrating options to it.

@unbit
Copy link
Owner

unbit commented Dec 5, 2014

I think this will be pretty undoable without a complete rewrite, and, in addition to this, will make plugin development really complex (as you need to manage locking when reading options). Closing it, maybe some idea will popup in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants