MySQL Timeout configuration

Source: Internet
Author: User

connect_timeout: Connection Response time-out. The server side will return a connection failure if the connection is not successful at this time.

wait_timeout: Connection Idle time-out. The time to wait for a connection that is not interactive with the server side until it is forcibly closed by the server side. It can be considered that the server-side connection is idle and the idle time is automatically closed.

interactive_timeout: Connection Idle time-out. The time to wait for a connection that is not interactive with the server side until it is forcibly closed by the server side.

Although the meanings of interactive_timeout and Wait_timeoutu are the same, there are essential differences in the use of objects. Interactive_timeout for interactive connections (such as connecting to a database via a MySQL client), wait_timeout for non-interactive connections (such as using PDO in PHP to connect to a database, of course you can set Client_ Interactive option to change). The so-called interactive connection, that is, the client_interactive option is used in the Mysql_real_connect () function.

net_read_timeout: Data Read time-out. The number of seconds to wait for data to be fetched from a connection before terminating the read, and when the service is reading data from the client, net_read_timeout controls when the time-out occurs. That is, the client performs a data read and waits for a number of seconds to be disconnected automatically when it is not successfully executed.

net_write_timeout: Database Write Time-out. Similar to Net_read_timeout, wait for how many seconds to write the block to the connection before terminating the write, and when the service is writing data to the client, Net_write_timeout controls when the timeout occurs.

slave-net-timeout: time synchronized from Couyan, wait n seconds when Slave thinks the connection to master is problematic, then disconnect, reconnect master

Slave-net-timeout functions from the library during master-slave synchronization; Connect_timeout: Works in the Get connection phase; Interactive_timeout and Wait_timeout: works in the connection idle phase; Net_read_ Timeout and net_write_timeout: It works when the connection is executed.

Transferred from: http://www.04007.cn/article/292.html

MySQL Timeout configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.