Tomcat sending requests to rails before it's fully loaded

When starting up rails under tomcat, if you send requests to the app
to soon, you get random errors in rails about classes and methods not
being defined. In most cases it works itself out, but in some it
doesn’t and you have to restart the app.

My thought was to fix this at the rack layer, and have some way to
tell rack if the app is available or not, returning a 503 if not.
Does this sound right?

I’m also not 100% sure at what point rails is fully loaded. I’m
thinking after its’ run it’s last initializer?

Chris

The behavior should be optional. Default should hold the request while
the app is starting and then complete it when the app is ready. As an
option the request could return “503 Service Unavailable” until the app
is available.

On 2011-12-19, at 20:50, snacktime wrote:

thinking after its’ run it’s last initializer?

Chris


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Uwe K.
[email protected]