Topic: Mongrel woes

Hey guys..

I've been running Mongrel behind an Apache proxy for my rails projects for a while now.. Just recently I've moved to a new dev server and reinstalled apache/rails/mongrel much the same way as I did on my old box. Ever since I've been having trouble keeping my apps running.

First of all whenever action mailer is called to send an email my pages stop rendering properly and end up being displayed in plaintext. At the same time this error pops up in my mongrel.log:

Error calling Dispatcher.dispatch #<NameError: cannot remove Object::LOCALIZED_STRINGS>

Google doesn't seem to have an answer. Restarting mongrel fixed it but it keeps happening every time the app sends an email. Nothing unusual seems to turn up in the development.log at this time.

Seperately though, I've noticed occurrences of this error:

ArgumentError (A copy of ApplicationController has been removed from the module tree but is still active!)

I'm not sure if they're related but it seems like a significant error and I could imagine the application controller being responsible for sending the content-type headers.

I don't really know what's going on..

Oh one last strange thing.. mongrel_rails restart is extremely slow. In the log I find this message repeated a few times at the time of shutdown:

Reaping 1 threads for slow workers because of 'shutdown'
Waiting for 1 requests to finish, could take 60 seconds.

Eventually it restarts but it feels like there's something wrong there. Again, I'm not sure what the error indicates..

Any help would be greatly appreciated.

Re: Mongrel woes

Well for lack of a response I kept on digging and eventually traced it to a difference in the way rails 1.2 handles includes compared to 1.1. I'm not sure about all the technical details but apparently you no longer have to require or include plugins, meaning removing these statements from my app controller fixed it:

#require 'localization'
class ApplicationController < ActionController::Base
  #include Localization
  -snip-
end

Strange that this would simply break the application rather than returning a warning of some sort.

Unfortunately removing those includes does seem to break some (but not all of) the plugins I use. So far Rails 1.2 isn't making me terribly happy wink

Last edited by marsvin (2007-02-06 15:44:57)