MySQL ERROR Got an error reading communication packets, communicationerror
Introduction
This error is often displayed in the error log. First, we can check the number of two error connections from show GLOBAL status like '% Aborte %, the following is an explanation of copying the official documentation.
Aborted_connects
If a client is unable even to connect, the server incrementsAborted_connects
Status variable. Unsuccessful connection attempts can occur for the following reasons:
A client attempts to access a database but has no privileges for it.
A client uses an incorrect password.
A connection packet does not contain the right information.
It takes moreconnect_timeout
Seconds to obtain a connect packet. See Section 5.1.4, "Server System Variables ".
If these kinds of things happen, it might indicate that someone is trying to break into your server! If the general query log is enabled, messages for these types of problems are logged to it.
ForThe possible causes of Aborted_connects errors include:
Client connection to an unauthorized database, wrong password, wrong connection package information, connection timeout (10 s by default)
Aborted_clients
If a client successfully connects but later disconnects improperly or is terminated, the server incrementsAborted_clients
Status variable, and logs an Aborted connection message to the error log. The cause can be any of the following:
The client program did not callmysql_close()
Before exiting.
The client had been sleeping morewait_timeout
Orinteractive_timeout
Seconds without issuing any requests to the server. See Section 5.1.4, "Server System Variables ".
The client program ended abruptly in the middle of a data transfer.
Other reasons for problems with aborted connections or aborted clients:
Themax_allowed_packet
Variable value is too small or queries require more memory than you have allocatedMysqld. See Section B .5.2.10, "Packet Too Large ".
Use of Ethernet protocol with Linux, both half and full duplex. some Linux Ethernet drivers have this bug. you shoshould test for this bug by transferring a huge file using FTP between the client and server machines. if a transfer goes in burst-pause-burst-pause mode, you are experiencing a Linux duplex syndrome. switch the duplex mode for both your network card and hub/switch to either full duplex or to half duplex and test the results to determine the best setting.
A problem with the thread library that causes interrupts on reads.
Badly configured TCP/IP.
Faulty Ethernets, hubs, switches, cables, and so forth. This can be diagnosed properly only by replacing hardware.
ForAborted_clients
Possible causes are:: The client does not close mysql_close (), and the time exceedswait_timeout
OrThe value of interactive_timeout (the timeout time of these two variables is 8 hours), the client ends during program execution,The package size of max_allowed_packet is too small, the network causes, and thread bugs.
Summary
Note: Author: pursuer. chen Blog: http://www.cnblogs.com/chenmh All essays on this site are original. You are welcome to repost them. However, you must indicate the source of the article and clearly give the link at the beginning of the article. Welcome to discussion |