I have one or 2 queries that take ~ 10 minutes to execute.
How do I manipulate the $db object to include timeouts?
$_SESSION['params'] = array(
'host' => '127.0.0.1',
'username' => 'sa',
'password' => 'password',
'dbname' => 'schema',
'driver_options' => $options
);
$db = createConnection($_SESSION['params']);
function createConnection( $params){
return Zend_Db::factory('Pdo_MSsql', $params);
}
I’m not familiar with the
PDO_MSSQLadapter, but according to the documentation, you can use thedriver_optionsparameter to add specific options to the adapter. See the example #7 in http://framework.zend.com/manual/en/zend.db.adapter.html#zend.db.adapter.connecting.parametersIf there is a
PDO_MSSQLparameter to set the timeout, you should be able to set it there.EDIT:
There seems to be a
PDO::ATTR_TIMEOUTattribute. According to the PHP documentation:EDIT2:
There seems to be a custom attribute for the
pdo_mssqldriver. According to this blog entry:Hope that helps,