unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* Autokill Workers which have grown too big
@ 2010-07-30 14:11 hukl
  2010-07-30 22:06 ` Eric Wong
  2010-07-30 22:32 ` Florian Hanke
  0 siblings, 2 replies; 3+ messages in thread
From: hukl @ 2010-07-30 14:11 UTC (permalink / raw)
  To: unicorn list

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 - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-07-30 23:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-30 14:11 Autokill Workers which have grown too big hukl
2010-07-30 22:06 ` Eric Wong
2010-07-30 22:32 ` Florian Hanke

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).