in reply to Trap DB Connect

I had a quick look at the DBI documentation on CPAN here and searched on timeout, finding the following text:
With Oracle for instance (DBD::Oracle), if the system which hosts the +database is down the DBI->connect() call will hang for several minute +s before returning an error.
I guess this is happening in your case.

There is a suggested solution in the documentation.