What happens to symfony when the database is offline?

kLyxxkLiEn

New Member
What exactly happens when the database attached to symfony goes offline or is unreachable? Maybe the answer to this question is in my face and I don't realize it, but I've been searching for the last while and still coming up empty handed.I've attempted to simulate this myself (in the "production" environment) by just stopping the database service (I'm developing on my Windows laptop--deploying on a LAMP server), but it just sat there until it exceeded the PHP execution time limit.I'm running symfony 1.4 with Doctrine. One would assume that it would throw some sort of catchable exception or maybe even be able to set a connection timeout and then throw an exception. I can't help but cringe at the thought of a customer just sitting there for 30 seconds waiting on a database query to finish that will never happen.If there isn't any preventative measures already in the symfony core, can anyone make any suggestions on how they handle it? I'll of course have a heartbeat monitor on the database, but if it goes down the site needs to be taken down, too.Update: Threw together a test script to just connect to the localhost database via Mysqli and it still reached the maximum execution time. However, it did throw a warning for the failed connection.-- Logan
 
Back
Top