In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you "how to solve the problem of connection timeout after 8 hours of idle in mysql". It is easy to understand and well organized. I hope it can help you solve your doubts. Let me lead you to study and learn this article "how to solve the problem of connection timeout after 8 hours of idle in mysql".
The application establishes a connection with the database, and if the application does not access the database for more than 8 hours, the database is disconnected. If you visit again, an exception will be thrown, as follows: Communications link failure due to underlying exception: * * BEGIN NESTED EXCEPTION * * java.io.EOFException STACKTRACE: java.io.EOFException at com.mysql.jdbc.MysqlIO.readFully (MysqlIO.java:1913) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket (MysqlIO.java:2304) at com.mysql.jdbc.MysqlIO.checkErrorPacket (MysqlIO.java:2803) at com.mysql.jdbc.MysqlIO.sendCommand (MysqlIO.java:1573). The solution to this in online articles is mostly to add the "autoReconnect=true" option to the database connection string. But this only works with previous versions of mysql4. You can't do this in the latest mysql. In fact, to solve this problem is also very simple, is to modify the startup parameters of mysql. The default timeout time for mysql is 28800 seconds, or 8 hours, so it's okay to add a zero. Mysqld-nt-- default-table-type=innodb-- interactive_timeout=288000 can also add this parameter to the "my.ini" file [@ more@]
The above is all the contents of this article entitled "how to solve the problem of connection timeout after 8 hours of idle mysql". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.