Unreachable database

27 views
Skip to first unread message

Renato Serra

unread,
Oct 11, 2015, 8:44:44 AM10/11/15
to Ruby on Rails: Talk
Hi guys!

I got an app that uses a remote SQL server database, this remote server is sometimes unavailable and i have no control over it. 
The app only uses the database to do stuff after login in with devise. But if the database is is down i cant even start the server as it just tried to start the connection pool.
Is there anyway i can get the static pages to still work when the database is not working? I cant seem to find anything about this which is odd as servers and networks are often unstable.

Thanks!!

Hassan Schroeder

unread,
Oct 11, 2015, 9:56:53 AM10/11/15
to rubyonrails-talk
Expecting a web *application* to start normally while it's missing a
significant component seems odd to me :-)

In any case, while you could probably do some hideous hackery to
ignore the initialization failure, why not just configure your front-end
server (nginx, httpd, whatever) to serve the static pages directly?

FWIW,
--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Consulting Availability : Silicon Valley or remote

Renato Serra

unread,
Oct 12, 2015, 11:18:52 AM10/12/15
to Ruby on Rails: Talk
Thanks for your reply Hassan,

yeah i kinda forgot about the front end server as its just under development. That would do indeed, i just thought there would be a more graceful way to handle this  from the app side :)
Reply all
Reply to author
Forward
0 new messages