This project is archived and is in readonly mode.
Rails 3.0 RC cannot capture exception when database goes down!
-
Jaroslaw Zabiello
- No changes were found…
-
Kane
i found similar issues as i wrote some workers with the nanite gem and activerecord
and found myself hacking PostgreSQLAdapter AbstractAdapter and ConnectionPool..best of all was that there is a ActiveRecord::ConnectionNotEstablished but its only used when no connection could be established at the beginning. If the connection is lost any time later PostgreSQLAdapter throws a PGError and AbstractAdapter simply converts this in a StatementInvalid exception.
-
Lawrence Pit
The easiest way to go about this is to create your own middleware, and insert it before the ActiveRecord::QueryCache middleware in your application.rb. This middleware can catch the exception, rescue and do the self-healing bit.
-
Rohit Arondekar
- State changed from new to wontfix
- Importance changed from to Low
I agree with Lawrence.