In the MySQL Log, CommunicationErrorsandAbortedConnec...

Source: Internet
Author: User
1305042: 14: 32 [Warning] Warning: tjss_pmanageruser: xxxxhost: 192.168.0.96 (Gotanerrorwritingcommunicationpackets) 1305042: 15: 13 [Warning] Warning: tjss_pmanageruser: xxxxhost: 192.1

130504 2:14:32 [Warning] Aborted connection 13145 to db: tjss_pmanager user: xxxx host: 192.168.0.96 (Got an error writing communication packets) 130504 2:15:13 [Warning] Aborted connection 13146 to db: tjss_pmanager user: xxxx host: 192.1

130504 2:14:32 [Warning] Aborted connection 13145 to db: 'tjss _ pmanager' user: 'xxxx' host: '192. 168.0.96 '(Got an error writing communication packets)
130504 2:15:13 [Warning] Aborted connection 13146 to db: 'tjss _ pmanager' user: 'xxxx' host: '192. 168.0.93 '(Got an error writing communication packets)

If the number of sleep processes is too large within the same time, and the number of connections in other States exceeds the value of max_connection, mysql is used outdoors except for the root user, you cannot continue to process any request and establish a connection with any request or directly go down. Therefore, this problem is quite serious under heavy loads. If you find that many dead connections exist in your mysql, first check whether your program uses the pconnect method. Second, check whether mysql_close () is called in time before the page is executed (),


There is another way you can go to my. in cnf, wait_timeout and interactive_timeout are added to reduce their values. By default, the value of wait_timeout is 8 hours. You can change it to 1 hour or half an hour. In this way, mysql will kill dead connections faster. Prevent the total number of connections from exceeding the value of max_connection. Or set the value of max_connection to a greater value, but this is obviously inappropriate. The more connections there are, the more pressure on your server. In fact, those connections are redundant, and killing them as soon as possible is the best strategy.

Official website has a detailed explanation: http://dev.mysql.com/doc/refman/5.1/en/communication-errors.html

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.