@deeky666 the ``Doctrine\DBAL\Connection`` implementation cannot throw an exception if it fails to connect, because it does not try. If it is not connected anymore, it closes the existing (timed out) connection. The actual reconnection will only happen on the next query execution, through the lazy connecting.
An exception will occur only the next time you do a query if it cannot connect (for instance if the server is down instead of being only a connection timeout), exactly like for an initial connection (because it *is* an initial connection).


So the issue here is that we have a different behavior between 2 cases:

- underlying connection is not a PingableConnection: return ``true`` if we are currently connected. Return ``false`` if the connection timed out or if we are not connected yet. This **does not** indicate that you should stop using the connection, as next query will connect lazily.
- underlying connection is a PingableConnection: the behavior depends on the implementation. And nothing guarantees that the next query can be done.


Here are my suggestions:

- change ``Doctrine\DBAL\Connection::ping`` to get rid of the return value (we don't actually care whether we are connected or the next query will do a reconnection. All we want is making DBAL close itself in case of timeout to restart the lazy connection later).
- document the PingableConnection so that it returns ``false`` if the connection timed out and cannot reconnect itself
- if the PingableConnection return false, close the connection in ``Doctrine\DBAL\Connection`` to reconnect later the hard way (like for connections which are not pingable.

what do you think about it ?