开发者

timeout in MYSQL

开发者 https://www.devze.com 2023-04-08 14:54 出处:网络
I have a java application that has long running processes and interact with db.It keeps getting the following:

I have a java application that has long running processes and interact with db. It keeps getting the following:

The开发者_如何学C last packet successfully received from the server was 3,601,168 milliseconds ago.  The last packet sent successfully to the server was 3,601,166 milliseconds ago.

The remote server has a wait_timeout 354600 which is in seconds. What could be wrong?


There could be a number of problems, but I don't believe wait_timeout is the culprit if your last packet was sent/received about 3600s ago and wait_timeout is 354600s. You could have lost the connection to the server or any other of a number of things. You need to post more about what your code is doing and more about what you expect to happen and what is actually happening.

  • Side question: MySQL was designed to create connections relatively quickly. Have you considered using a connection pool rather than continuously using one connection explicitly?

As for Cassio's comment under the question... wait_timeout is in seconds. MySQL Docs - wait_timeout

0

精彩评论

暂无评论...
验证码 换一张
取 消