Skip Menu |

This queue is for tickets about the DBD-JDBC CPAN distribution.

Report information
The Basics
Id: 72816
Status: new
Priority: 0/

Owner: Nobody in particular
Requestors: theglauber [...]

Bug Information
Severity: Important
Broken in: 0.71
Fixed in: (no value)

Subject: Optional timeout for getConnection
Download (untitled) / with headers
text/plain 907b
In many JDK versions, DriverManager.getConnection() is synchronized, which means only one thread at a time can get a database connection. This usually works fine, but it is possible to specify an invalid server name or address in the DBI URL, which causes DriverManager.getConnection() to try for a long time or potentially almost forever, causing other connection attempts to queue up. In particular, using an address of seems to cause very long waits. (It's possible to deal with this at the perl level, but only if every perl script that uses this instance of DBD-JDBC is well behaved. It's not possible to prevent a rogue perl script from launching a denial of service attack using this method.) It would be nice to be able to specify a maximum amount of time to obtain a JDBC connection (e.g.: 10 seconds) and have DBD-JDBC give up and return an error if it takes longer than that.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to