The last packet sent successfully to the server was 0 milliseconds ago. The driver has no received any packets from the server. (about JDBC)

Source: Internet
Author: User

0  from the server.

Today the operation of the database large database access to the problem, is roughly the database connection buffer pool problem, get a half-day of MySQL (Ubuntu).

Workaround:
(1) using the AutoReConnect attribute in the JDBC URL, the URL is added

&autoreconnect=true&failoverreadonly=false
For example:
String URL = "Jdbc:mysql://localhost:3306/mxmanage&autoreconnect=true&failoverreadonly=false";

(2) Modify the MySQL parameters. /ETC/MY.CNF add

[mysqld]wait_timeout=31536000interactive_timeout=31536000

(3) Restart MySQL

Service MySQL Restart

Cause Analysis:
(1) MySQL connection connection may fail in a large number of data access cases
(2) long time may ask, connection will fail

The last packet sent successfully to the server was 0 milliseconds ago. The driver has no received any packets from the server. (about JDBC)

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.