Zed,
Very cool, finally got around to playing with StatusHandler and
StatisticsHandler. One thing that was missing that I wanted was insight
into _what_ the RailsHandler was working on, and what was queued up
while it sat in single-threaded mode -- ie., the current list of requests.
W/ the attached mongrel.conf, I hacked the RailsHandler to keep a hash
of active requests, and spit that out in the StatusHandler.
Any thoughts or feedback on this (attached)?
thanks,
Michael
noreply at rubyforge.org wrote:> Feature Requests item #4420, was opened at 2006-05-10 02:10
> You can respond by visiting:
>
http://rubyforge.org/tracker/?func=detail&atid=5148&aid=4420&group_id=1306
> Initial Comment:
> It would be really nice to have some insight into what a production Mongrel
process is doing, in particular if it''s stuck running a long-running
Rails process.
>
> I''m thinking something like Apache''s server-status, or
maybe having it dump to the log the list of queued requests in response to a
signal.
>
> ----------------------------------------------------------------------
>
>> Comment By: Zed Shaw (zedshaw)
> Date: 2006-05-23 05:57
>
> Message:
> Done and in svn. Take a look at examples/simpletest.rb for how
it''s used. I''ll be documenting it, but basically add
>
> stats = Mongrel::StatisticsFilter.new(:sample_rate => 1)
> uri "/", :handler => stats
> uri "/status", :handler =>
Mongrel::StatusHandler.new(:stats_filter => stats)
>
> To a config/mongrel.conf and use -S to run it. Adjust sample rate to around
300 for a lower load.
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mongrel.conf
Url:
http://rubyforge.org/pipermail/mongrel-users/attachments/20060611/2362a424/attachment.bat