I have a couple of programs which access different remote databases distributed in our wan. The programs are invoked in a cronish manner several times a day. The communication is done with tcp/ip over fixed 2Mb lines.
Lately there has been a lot of problems with the reliability of those links, related to HW-failure at the link provider and excavators cutting the backbone fiber, etc, etc.
Until recently I didn't think this was a major problem with the application, because if the program failed with a timeout due to the broken link, then DB's would be resynced on the next time the programs starts with a functional link
However, here's where I spotted an, to me anyways, odd behaviour of possibly DBI and/or DBD::ODBC.
Consider this scenario
The fix:
What I did was to use Net::Ping to test wheter the link was up before invoking the connect method of DBI. This does however not handle the case where the link goes down during a connection, and the previous scenario could very well occur again.
More info
Program fail on Win2000 and
WinXP
AS perl v 635
DBI v 1.37
DBD::ODBC v 1.05
Also I'm using DSN's to connect.
my $dbh = DBI->connect("DBI:ODBC:$dsn") or die "Could not connect to $dsn >> $DBI::errstr\n";
I have tried to find something related through google and one of the mailing-list archives for DBI, but no avail.
Question:
As I'm totally stumped by this, I welcome any input to the problem.
In reply to Timeout problems with DBI by guha
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |