Forum: Ruby on Rails What to do when the database server is in another place

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Mongeta 9. (Guest)
on 2009-02-04 16:59

I'm serving an application, that the database is in another place

Once connected, everything is ok, but when you try to login, normally,
the Rails isn't connected, and I'm getting an Status: 500 Internal
Server Error.

If I wait 2 or 3 seconds, the connection with the databse has been
established again and now all works perfect.

Is there a way for Rails to have always the connection opened ?

Maybe I should check for database connection on the first time and
handle the error or the waiting page until the connection has been

Any ideas appreciated .....



/!\ FAILSAFE /!\  Wed Feb 04 15:51:41 +0100 2009
  Status: 500 Internal Server Error
  PGError: server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
: SELECT * FROM "sessions" WHERE (session_id =
E'059e8560022e9b60b603117a3895a6ae')  LIMIT 1
This topic is locked and can not be replied to.