Com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communications Link Failure Database error

Source: Internet
Author: User

--Query MySQL database link idle time hold maximum idle time in seconds

SHOW VARIABLES WHERE variable_name = ' interactive_timeout ';

--The wait_timeout is similar to the parameter, and when modified, it is modified together.

SHOW VARIABLES WHERE variable_name = '%timeout ';

--Problem solving

Com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communications link Failure

Caused By:org.hibernate.TransactionException:JDBC commit failed
At Org.hibernate.transaction.JDBCTransaction.commit (jdbctransaction.java:130)
At Org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit (hibernatetransactionmanager.java:657 )
... More
caused by:com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:Communications link failure during Commit (). Transaction resolution unknown.

Com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:No operations allowed after connection closed.

--Pay attention.

(1) Encounter such a problem, first determine whether the idle time after the opening of the transaction is too long resulting in the transaction link is recycled, as long as you operate on the database, it is not idle, this problem does not occur

(2) network problems, resulting in the database cannot be linked

(3)

--The number of file lines in a Linux system query file

GREP-A 10-b 5 "Query data string" Catalina.out.2015-10-14.log |more

Grep-rn "Query string" file name

--P Indicates the line, cannot save

Sed-n ' start line, end line P ' Catalina.out.2015-10-14.log

Com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communications Link Failure Database error

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.