Hi,
we are experiencing a 5 seconds latency while connecting to a mySQL server DB (windows) through a perl script running on an apache server (linux).
Both www and db server are almost in idle status and they are connected throug a switched gb lan and are on the same subnet.
Addressing between the two is based on IPs to avoid dns resolution latency.
We get same delay using php directly.
We tryed to connect to different DBs but we always receive 5 secs of delay.
We get no errors in connection, just delay.
Here is the script we are using:
#! /usr/bin/perl -w
print “Content-Type: text/plain\n\n”;
Connect to the database.
eval {
require DBI;
my $dbh = DBI->connect("DBI:mysql:database=xxxxxxx;host=xxx.xxx.xxx.xxx ",
“xxxxxxx”, “xxxxxx”, {‘PrintError’ => 1,‘RaiseError’ => 1});
};
print “error: $@”;
Any help would be really appreciated!
andrea