mysql_connect_timeout problem when using times less than 1 sec



The DBI module when connecting to a mysql database seams to only support
integer values for the mysql_connect_timeout if you use say 0.5 secs as the
timeout value it defaults to 3secs. Does anyone know a way round this
problem as i need a very short timeout in my application.

for example

#does not work and defaults to 3 secs timeout
$dbh = DBI->connect("DBI:mysql:db_name:db_host:3306;mysql_connect_timeout=
0.5","username","password");

#does work and timesout after 1 sec
$dbh =
DBI->connect("DBI:mysql:db_name:db_host:3306;mysql_connect_timeout=1","username","password");

Thanks

Duncan

Relevant Pages

  • Re: OE6 does not connect with pop3 server
    ... the server, but I don't know how to show the failing attempts. ... Also tell us how long your timeout is set ... > and didn't notice sufficient change to justify leaving it disabled. ... > connecting with sending and receiving my speculation would be that ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: OE6 does not connect with pop3 server
    ... a "known problem" with the XP firewall. ... I deal with the problem by having the server timeout as quickly as possible ... connecting with sending and receiving my speculation would be that ... > My POP.viewmark account is configured to be the first one connected too. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: XINETD
    ... So how can I see the ip number and port of the connecting client in the ... > set timeout 2000;# timeout in ms ... > fileevent stdin readable getdata ... > proc getdata { ...
    (comp.lang.tcl)
  • Re: POP connection timeout.
    ... except someerror, err: ... print "Connecting to mail box has timed out:\n", ... but I am using python 2.4. ... you can set a different timeout for retrieving mail using pop.sock.settimeout ...
    (comp.lang.python)
  • Re: [SLE] dialup disruption
    ... >> Since some time now I have constant problems with connecting to ... > What did your set your timeout to, ... Did indeed have a timeout set from 600 seconds and found in ... the /var/log/messages that reason for disconnect was:Timeout due to ...
    (SuSE)