Mongrel is getting closer and closer to being a rock solid release. My
is to release 0.4 as “production ready” by Canada on Rails. Please
any problems or suggestions you have. There won’t be any major features
improvements just fixes and code reviews to repair any found bugs or
People interested in Mongrel should look at
and remember, you can report bugs by clicking on the two yellow beetles.
You don’t have to join the mailing list as I actively check that bug
You can get Mongrel using: gem install mongrel
If you had garbage file uploads than this release is for you. This
has a small fix for a big problem where people uploading files or using
multipart forms would not receive the CONTENT_TYPE and get garbage in
Turned out to be a four character fix. I hate that.
This release also adds a few things to help people debug their use of
threads within their Ruby on Rails applications. When you run
with the -B (debugging) option Mongrel will report all active threads
between each request to log/mongrel_debug/thread.log. If you see
Mongrel being overloaded, threads getting killed, or having to wait for
Mongrel to shutdown then turn on debugging (-B) and look in this log.
most likely are doing something that keeps the thread from exiting.
Mongrel also deals with dead threads much better. First the graceful
shutdown will wait 10 seconds for a request to finish before aborting it
during the shutdown process. Second it will find processing threads
have taken longer than 60+timeout seconds and kill them. Finally, you
put a value into your own Thread.current and when you use the thread.log
can figure out which controllers and actions are creating the bad
For example, lets say you see a thread leak. Many times this is caused
trying to make a connection to a remote resource that isn’t there, but
you’re not sure. What you do is put this into the suspected
Thread.current[:bad_controller_action] = true
Or some of other tag to differentiate it with the other threads. Then
Mongrel with -B and if you see this in the KEYS list then you know that
is the controller.
MYSQL DROPPED CONNECTIONS? ANYONE?
Finally, there seems to be a bug in Rails where it is constantly
the connection to MySQL. I’ve found this error on nearly everything and
it’s worse when you run WEBrick. It seems to get a little better when
set ActionController::Base.allow_concurrency in your
the problem is lessened especially if you run Mongrel, which I don’t
understand at all.
I’m still trying to determine the cause of this, but if you see this
please report it to me with what system you are running and how often
Remember, this is a Rails problem not a Mongrel problem since I see it
with WEBrick, FastCGI, SCGI, and on Win32, FreeBSD, OSX, and Linux.
Zed A. Shaw