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

How to check (or log) memory_usage by a worker process before it restarts? #241

Open
knd opened this issue Aug 2, 2016 · 0 comments
Open

Comments

@knd
Copy link

knd commented Aug 2, 2016

I currently have this setting.

 66     # restart if memory gets too high
 67     w.transition(:up, :restart) do |on|
 68       on.condition(:memory_usage) do |c|
 69         c.above = 200.megabytes
 70         c.times = 2
 71       end
 72     end

I'm having issues finding the reasonable limit. I'd to get more information (e.g. current memory usage, timestamps) right before the process restarts or when this condition is met.

The /var/log/god.log doesn't show much info except

I [2015-07-20 10:39:19]  INFO: Loading /opt/god/god.conf
I [2015-07-20 10:39:19]  INFO: Syslog enabled.
I [2015-07-20 10:39:19]  INFO: Using pid file directory: /var/run/god
I [2015-07-20 10:47:48]  INFO: Loading /opt/god/god.conf
I [2015-07-20 10:47:48]  INFO: Syslog enabled.
I [2015-07-20 10:47:48]  INFO: Using pid file directory: /var/run/god
I [2015-07-22 09:38:26]  INFO: Loading /opt/god/god.conf
I [2015-07-22 09:38:26]  INFO: Syslog enabled.
...

Please help.

@knd knd changed the title How to check (or log out) memory_usage by a worker process before it restarts? How to check (or log) memory_usage by a worker process before it restarts? Aug 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant