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
Added support of max_rss ala reload_on_rss of uwsgi #568
Conversation
Actually the fix is for this kind of situation :
so the process |
I though they were already a plugin for that? https://github.com/mozilla-services/circus/blob/master/circus/plugins/resource_watcher.py |
My bad, I didn't read enough doc. In my case, I need to give absolute value for max memory use anyway. Are you intrested in a pull request on ressource watcher ? |
Absolutely, thanks!
That could be a specific PR yeah. We should not loop on all processes though to do this, as this can cost some CPU. I propose that we cleanup this kind of process in https://github.com/mozilla-services/circus/blob/master/circus/watcher.py#L633 when process.info() returns 'no such process' do you think you can manage to write a test for this failure ? (I know this one can be tough) |
I started writing some code fore the ressource watcher but strangely I can't make it work (even the non-modified version). Here is a gist of what i'm trying to do https://gist.github.com/pomarec/7056349 but the process is not restarted (my computer has 4GB of memory). I will also make the modification for the non-existing process but i'm affraid I don't know how to simulate this situation. |
@pomarec You can run plugin manually using the circus-plugin script. that way you can add a pdb into the plugin to see what's going on |
@pomarec some progress ? I'm interested in your new feature (reload on rss) :-) |
The first part is not ready. |
New pull request for max and min mem_abs #609 |
@tarekziade concerning the zombie process issue, it seems strange to me that it would be managed by stat. Shouldn't it be the watcher that watches for this kind or error ? |
Conflicts: circus/plugins/resource_watcher.py circus/tests/test_plugin_resource_watcher.py
Processes can die at any time, so it seems right to me to make sure stats knows how to deal with this situation
I'd love that - I would not want to lose your fix. We can work from there to add a test |
Should I close this PR ? |
Closing for now - feel free to reopen in case we need to |
Opened new PR for zombie processes #638 |
To be honest i'm not really sure of what i'm doing. Especially concerning logging and notify_event.
I also added a fix concerning some processes that were not recognized as zombie but were kind of stopped.