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

monitor child memory usage #18

Open
nevans opened this issue Feb 8, 2011 · 7 comments
Open

monitor child memory usage #18

nevans opened this issue Feb 8, 2011 · 7 comments

Comments

@nevans
Copy link
Collaborator

nevans commented Feb 8, 2011

monit style limits, e.g. 2 cycles at 500MB and QUIT, 6 cycles at 600MB and TERM, 8 cycles at 600MB and KILL.

must be settable in the config file (and the WebUI). must be settable per worker type, as well as for default.

will need to extend config file format to support this.

@nevans
Copy link
Collaborator Author

nevans commented Feb 8, 2011

this is doubly important if you can't run REE for some reason or another.

@haruska
Copy link
Contributor

haruska commented Feb 9, 2011

I have a hard coded version on the backupify fork. I'll clean it up. We may be able to get away with not changing the config file by making them command line vars.

@nevans
Copy link
Collaborator Author

nevans commented Feb 10, 2011

I'd prefer to make it configurable per worker-type, and that would get messy if we used environment variables. We could certainly implement the feature in smaller pieces (e.g. stage 1: default for all workers in the pool using env vars; stage 2: configurable per worker type from config file; stage 3: Web UI, etc). But I'd prefer to leave it as a separate branch from the main release until we're at least to stage 2.

Until it's complete, someone who only needs the partial functionality can easily enough install the branched version from their gem file via :git. What do you think?

@haruska
Copy link
Contributor

haruska commented Feb 10, 2011

that's reasonable. probably never get to stage 3.

You could also merge in stage 1 and continue to support an env var through stage 2. It's additive functionality and then you don't have people baking branch names into their bundler Gemfile

@nevans
Copy link
Collaborator Author

nevans commented Feb 11, 2011

Oh, we'll get to stage 3 all right. I'm tired of the tweak yml and /etc/init.d/app_resque reload cycle. :)

On second thought, I think I will merge your "stage one" changes into master before I get around to stage two (which would be this issue).

@nevans
Copy link
Collaborator Author

nevans commented Mar 15, 2011

I merged your branch into my memory_usage branch, reorganised the code a bit, and (most importantly) changed the configuration. See https://github.com/nevans/resque-pool/blob/memory_usage/ExperimentalFeatures.md for info on how to configure it now.

However, I have not done any significant testing on the memory management code nor the orphan offset code. I've simply confirmed that they don't mess with anything else unless they are configured in.

I'm fairly certain there are some bugs in the orphan watcher code, but I might just be misunderstanding what you are trying to do. :-)

@nevans
Copy link
Collaborator Author

nevans commented Mar 16, 2011

Again, I haven't really tested this much yet, but I've just pushed 0.3.0.beta.1 which includes your memory management code (and my changes for configuration). It might be a few weeks before I get around to properly testing this out personally, so any feedback is welcome.

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

2 participants