1 message in com.mysql.lists.perlmysql_connect_timeout problem
FromSent OnAttachments
Leonid Gernovski22 Feb 2002 14:52 
Subject:mysql_connect_timeout problem
From:Leonid Gernovski (leon@grandvirtual.com)
Date:02/22/2002 02:52:29 PM
List:com.mysql.lists.perl

Hi,

I have a weird problem with mysql_connect_timeout option. I am using DBI::mysql version 2.0415, 1.14 DBD The test command I am running from shell is the following:

$ perl -e 'use DBI;my $dbh=DBI->connect("DBI:mysql:<database>;host=<host>;mysql_connect_timeout=2" , <user>, <password>, undef);'

1) When I try to connect for the FIRST TIME to a DB on remote host which is known to be down, the DBI->connect() call returns immediately with error 113 (No route to host), before the 2 second timeout specified in the options has expired.

2) When I power-up and bring online the remote host, the connection succeeds.

3) When I power down the remote host and try my command again, the connect call either never times out or times out only in few minutes without any error messages. Most of the times I just have to kill it with CTRL-C.

Does anyone any ideas? Thanks in advance. Leo Gernovski