MySQL Forums
Forum List  »  General

Re: MYSQL_OPT_READ_TIMEOUT
Posted by: Roel Van de Paar
Date: April 12, 2009 08:59PM

The MYSQL_OPT_READ_TIMEOUT and MYSQL_OPT_WRITE_TIMEOUT options to mysql_options() work for all TCP/IP connections since 4.1.22/5.0.25/5.1.12.

From the manual page at http://dev.mysql.com/doc/refman/5.1/en/mysql-options.html:

MYSQL_OPT_READ_TIMEOUT (argument type: unsigned int *)

The timeout in seconds for attempts to read from the server. Each attempt uses this timeout value and there are retries if necessary, so the total effective timeout value is three times the option value. You can set the value so that a lost connection can be detected earlier than the TCP/IP Close_Wait_Timeout value of 10 minutes. This option works only for TCP/IP connections and, prior to MySQL 5.1.12, only for Windows.

MYSQL_OPT_WRITE_TIMEOUT (argument type: unsigned int *)

The timeout in seconds for attempts to write to the server. Each attempt uses this timeout value and there are net_retry_count retries if necessary, so the total effective timeout value is net_retry_count times the option value. This option works only for TCP/IP connections and, prior to MySQL 5.1.12, only for Windows.

Options: ReplyQuote


Subject
Written By
Posted
April 11, 2005 07:17AM
Re: MYSQL_OPT_READ_TIMEOUT
April 12, 2009 08:59PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.