No commit activity in last 3 years
No release in over 3 years
Dedicated to my dead cat and goodreads.com
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

Weasel¶ ↑

Simple memory monitor - used in production with passenger to limit uptime of a service using excessive memory - as happens with ruby-1.8.7 on non ree projects

see ./bin/weasel for all the arguments that it takes

Example ¶ ↑

weasel –callback “%x{kill -USR1 #{pid.to_s}}” –watch “Rails:” – num_cycles 3 –num_over_marks 2 –callback_message ‘sending SIGUSR1’ –high_water_mb 440 –delay 1

the above will send sigusr1 (graceful exit) to all the processes matching 'Rails' that run over 440MB 2 out of 3

samples.

Samples are taken a total of 3 times with a delay of 1 second between them.

Put this in a cronjob to run every minute and you have a very simple, robust way to reap overmemory processes.

You can also combine this nicely with services that use daemontools if you don't want to write complex restart / shutdown code.

Contributor¶ ↑

Ben Somers - 1.9 support and production friendly test support

Fin¶ ↑

Copyright © 2010 Curtis Schofield. See LICENSE for details.