in reply to alarm in DBI module

As the postgres client library allows to set a timeout for the connecting stage, the implementation of that feature may interfere with any timer previously set from the caller code.

You can change the default timeout (15s) on the DBI connection string as follows:

my $dbh = DBI->connect("dbi:Pg:dbname=$db_name;host=$db_host;connect_t +imeout=$db_connect_timeout", ...);