Hey,

at Euruko 2010 I saw a presentation where Florian Hanke presented parts of a unicorn config which killed workers once they've used up too much memory.

The snipped looks like this:

RackResponder = lambda do |env|
  possibly_commit_harakiri ...
end

# Commit Harakiri/Seppuku, kill yourself. #
def possibly_commit_harakiri
  return unless commit_harakiri?
  Process.kill “KILL”, Process.pid
end

Now I couldn't find anything about that RackResponder part on the web and was hoping that Florian himself or somebody else on the list could clue me in how that works.

Also I'd like to know if there is a way to get the current memory footprint of a worker other than something like:

%x(ps -o rss= -p #{Process.pid}).to_i

Kind regards,

John
_______________________________________________
Unicorn mailing list - [email protected]
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

Reply via email to