MySQL the last packet successfully received from T

Source: Internet
Author: User
Tags mysql connection pool set time

I started the migration blog, the entire structure of the blog building and coding http://www.cookqq.com/lookBlog.action?id=c7d6978a-0dc0-4648-9020-2b81d859a243


MySQL server recently always error, the content is as follows:

The last packet successfully received from the server was 65,502,275 milliseconds ago. The last packet sent successfully to the server was 65,502,276 milliseconds ago. is longer than the server configured value of ' Wait_timeout '. Should consider either expiring and/or testing connection validity before use in your application, increasing the SER Ver configured values for client timeouts, or using the Connector/j Connection property ' Autoreconnect=true ' to avoid this Problem.

The main meaning is: The database has a long connection, because it is not used for a long time, and the idle time exceeds the Wait_timeout set time. The database automatically releases the link when it is set to Wait_timeout.

The client also has this long connection, the client uses this long connection to the MySQL database to send messages, but this link database server has been released, so burst the above error.


If you happen to see the log record in the first time that the database times out, then the first time-out error is this:

ERROR [org.hibernate.util.JDBCExceptionReporter]-Communications link failure

Last packet sent to the server was 0 ms ago.

If it is not the first time after the execution, each subsequent error will become nested errors, this is the following:

ERROR [Org.hibernate.util.JDBCExceptionReporter]-

No operations allowed after connection closed. Connection is implicitly closed due to underlying exception/error:


Workaround: Because of the number of code in the project, it is troublesome to find which long connection is not released, the process is as follows: (1) Check the reading of the wrong log details, see the relationship to which DAO class problems arise

(2) Then set the MySQL connection pool maximum and minimum data to 3,1.

(3) Then open 3 Browser, to operate

(4) found that the project is really slow, and then a detailed look at the code, and indeed because a local connection pool is not related, causing the link to persist, not released.




MySQL the last packet successfully received from T

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.