Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What about the Tomcat JDBC database connection pool disconnection reconnection error

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article is a detailed introduction to "Tomcat JDBC database connection pool disconnection reconnection error how to do", detailed content, clear steps, details properly handled, I hope this article "Tomcat JDBC database connection pool disconnection reconnection error how to do" article can help you solve doubts, the following with the small series of ideas slowly in-depth, together to learn new knowledge bar.

If the connection to the database takes too long, the database will usually reclaim the connection (disconnect). MySQL takes 8 hours, Oracle takes 10 minutes.

To improve performance, database connection pooling techniques are often used. Connection pools can hold connections for long periods of time, and errors can result if the database disconnects without the connection pool knowing it.

Common error messages are:

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failureThe last packet successfully received from the server was 1 milliseconds ago.java.net.SocketException: Broken pipeline Couldn't rollback jdbc connection. No operations allowed after connection closed.

Jspxcms uses the Tomcat JDBC connection pool, plus the following configuration can avoid this problem:

Tomcat JDBC complete configuration in Spring:

Read here, this article "Tomcat JDBC database connection pool disconnect reconnect error how to do" article has been introduced, want to master the knowledge point of this article also need to practice to understand, if you want to know more about the content of the article, welcome to pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report