The documentation for ATTR_TIMEOUT says:
Specifies the timeout duration in seconds. Not all drivers support this option, and it's meaning may differ from driver to driver. For example, sqlite will wait for up to this time value before giving up on obtaining an writable lock, but other drivers may interpret this as a connect or a read timeout interval.
I am using an ODBC connection via unixODBC to a closed-source database called Vertica, and I am not seeing the proper connection timeout behavior when I connect via:
$this->conn = new PDO($dsn, $user, $password,
array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATTR_TIMEOUT => 2)); // timeout in 2 seconds
Is that behavior provided by the PDO PHP class, or unixODBC, or the Vertica ODBC driver itself? Trying to figure out where to start debugging.