How to set Database connection timeout in zend framework 1 via application.ini file

313 Views Asked by At

Currently, I am getting timeout error after 30 seconds if database does not connect. I want the same error after 2 seconds.

I have tried this:

Zend_Db_Table::getDefaultAdapter()->getConnection()->setAttribute(PDO::ATTR_TIMEOUT, 2)

But it is not working and also is I want to solve this problem by application.ini file.

I think, I need something like this :

resources.multidb.msg.driver_options = "PDO::ATTR_TIMEOUT = 2"
0

There are 0 best solutions below