[Mongrel] Multiple mongrels for one app

hax hax at cheaphacks.info
Wed Aug 23 08:29:37 EDT 2006

> You actually can find out for yourself right now.  I have the latest
> pre-release up with a new debugging feature just for folks like you.
> First, install the pre-release like this:
>   sudo gem install mongrel
> --source=http://mongrel.rubyforge.org/releases/
> Then run your application in production mode like normal.  Right after
> it starts up, do this:
>   killall -USR1 mongrel_rails
> Go look at the log/mongrel.log and you'll see that it says it set
> $mongrel_debug_client to true.  The USR1 signal toggles this "client
> debugging" true/false.  When it's true Mongrel will print out log
> messages that help you debug client interactions:
> * BAD CLIENT is only logged now when USR1 is on.
> * Full request data is printed out when there's an HTTP parsing  
> error so
> you can see what the problem is.
> * It will print the number of threads waiting for rails on 10 second
> intervals.
> * It prints stack traces for exceptions found (I'm expanding this  
> more).
> It's also very light, so you could enable it all the time if you want.
> Now, what you want to do is hit your app with httperf like this:
> httperf --server --port 3000 --uri /some/rails/uri --num- 
> conns
> 1000 --rate 100
> And then watch your mongrel.log print out the request counts as they
> pile up behind rails and then move out.  Play with num-conns and rate
> until you can choke mongrel, find the sweet spot, etc.
> Have fun and let me know if you find bugs.

Wow, amazing responses, that answers every question I could have  
possibly had plus more :)

Thanks everyone!

Also, Zed, you rock :)


More information about the Mongrel-users mailing list