Why does Hibernate/JDBC/MySQL drop connections after a day or so?

前端 未结 4 629
-上瘾入骨i
-上瘾入骨i 2020-12-05 08:03

I have several server processes that once in a while respond to messages from the clients and perform read-only transactions.

After about a few days that the servers

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-05 08:52

    I changed my hibernate configuration file by adding thoses lines and it works for now:

        true
        true
        true
    

    I think that using c3p0 pool is better and recomanded but this solution is working for now and don't present ant problem.
    I let the Tomcat On for 24hours and the connection wasn't lost .
    Please try it .

提交回复
热议问题