dbTalk Databases Forums  

Changing the inital Connect() timeout

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss Changing the inital Connect() timeout in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Gregor Kronenberger
 
Posts: n/a

Default Changing the inital Connect() timeout - 03-12-2005 , 03:42 PM






Hello,

I am currently working on a client for a school project that needs to fail
over to a secondary server if the primary server fails or is down.

The projects requires a short failover time, since my teammates and I want
it to be transparent to the user.

I have looked at the MySQL++ source code and changed the call to the
Connection() constructor to include a connect_timeout value. I am under the
impression that this value determines how long MySQL++ waits for an initial
reply from the host it is trying to connect to. Regardless of which value I
put into this function, it appears that the exception is thrown ~20 seconds
after I call the constructor.

I have searched google to find someone with a similar problem, but it
appears that I am the only one who has this. I downloaded a sourceforge
project (MySQL-Navigator) that connects to a MySQL-DB and it has the option
to let me specify a 'timeout'. Once again, giving it two drastically
different values (99 and 2), I still get a timeout after ~20 seconds, when
I enter an IP that is not in use on our lan.

I was wondering if someone has ever gotten a different timeout length to
work and/ or if I am looking at the right place (I tried manually setting
the mysql_options(&mysql ,MYSQL_OPT_CONNECT_TIMEOUT, (char *)&mytoVal) to
no avail.

Any/ all help would be greatly appreciated,

Greg

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.