Rails 3 on Apache with Passenger: I need to take down Rails so that the DB connection(s) are closed — this is necessary to perform some regular database maintenance — but I want Apache up so that it can respond to requests with a static maintenance page.
I am using Capistrano and have seen the threads on how to invoke maintenance mode, but I need to know where to hook my DB tasks, and cannot figure out where.
Any links, or even pointers to where to look in the Capistrano code would be greatly appreciated.
TIA
You can use capistrano’s
deploy:web:disabletask to block access to your site, allowing you to do database maintenance, etc:Then, once you’re done: