Julie Baroff writes:
 > If connect to mysql server using C API function and mysql server is under very
 > high load, client never timeout, it's just sit there waiting - how to stop
 > this?
 > 
 > I use the mysql_options() first to set timeout
 > 
 > 
 > const char *timeout = "1";
 > 
 > mysql_init(&mysql);
 > mysql_options(&mysql, MYSQL_OPT_CONNECT_TIMEOUT, timeout);
 > 
 > then mysql_real_connect
 > 
 > 
 > 
 > 


Hi!

There is a timeout option for the client and net_read and write
options for the server by which you can regulate these problems.


Regards,

Sinisa

      ____  __     _____   _____  ___     ==  MySQL AB
     /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|     Sinisa Milivojevic
    /*/ /*/ /*/   \*\_   |*|   |*||*|     mailto:[EMAIL PROTECTED]
   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|     Larnaca, Cyprus
  /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|____
  ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^
             /*/             \*\                Developers Team

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to