-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Dynamic numproc change #177
Comments
+1! |
+1 |
1 similar comment
+1 |
+1 |
Do the authors have any intention of implementing this? I'm evaluating similar tools and would like to know what to count on. |
No one is currently working on it but this feature could also be implemented as a plugin. |
+1 |
3 similar comments
+1 |
👍 |
+1 |
How would plugin for this look like? |
The supervisor_twiddler plugin does not adjust |
+1 |
4 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
1 similar comment
+1 |
I write a plugin supervisor_grace to solve this program forked from supervisor_twiddler. It's need to change the config file right now. I found it is complex to change the numproc online. |
Is this now done? Or can this be done via changing config file only now? |
+1 |
2 similar comments
+1 |
+1 |
+1 |
+1 |
20 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
Please stop this +1'ing. You're spamming 51 people every time. Sorry for one more spam mail... |
I've just done this feature in my plugin:
It works dynamically on programs and event listeners. I did not test with real FastCGI programs but it has been implemented. Basic configuration and tests can be found here: It's quite more tricky than what Mike did in supervisor_twiddler and I don't believe that I have overcomplicated things. The only drawback in doing this from a plugin is that an event listener cannot subscribe to the new events (PROCESS, PROCESS_ADDED, PROCESS_REMOVED) in its configuration file as these events won't be recognized by Supervisor. The listener has to subscribe to EVENT (yeah, sob). Mike, for future versions of Supervisors, what about adding a CUSTOM_EVENT_TYPE / PLUGIN_EVENT_TYPE (empty class CustomEventType / PluginEventType inheriting from Event) to support such feature ? Not perfect but that's a simple way to reduce the events. Ideally a plugin callback to be called before the program sections are evaluated would be nice. |
Hello, is anyone still working on this feature? |
@Dmytro-Shvetsov if you're running separate config files for each process, instead of using numprocs, just duplicate your configs with _1, _2, _3, etc at the end. Stop all processes that you don't need, give yourself some room for expansion. It's super poor, but if you're managing your processes outside of supervisor, it works. |
@GameCharmer yeah, it does sound like a hell of a workaround. However, I truly cannot estimate on what hardware I'll run my project so the number of processes need to be scaled dynamically. Can you maybe suggest alternatives to supervisor to do so, or is there like a plug-and-play plugin for supervisor? |
@Dmytro-Shvetsov You can give Twiddler a shot, but I've never tried it successfully: https://github.com/mnaberez/supervisor_twiddler |
Wow, the Twiddler works like a charm. I managed to get the processes spawned dynamically with the following code:
Thank you! |
This would be a great feature - command to dynamically set the numprocs variable and span or kill procrocs when it change
The text was updated successfully, but these errors were encountered: