MySQL ERROR Got an error reading communication packets, communicationerror

Source: Internet
Author: User

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_connectsStatus 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_timeoutSeconds 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_clientsStatus 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_timeoutOrinteractive_timeoutSeconds 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_packetVariable 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_clientsPossible causes are:: The client does not close mysql_close (), and the time exceedswait_timeoutOrThe 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

Related Article

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.