Hibernate, C3P0, Mysql — Broken Pipe

后端 未结 5 472
予麋鹿
予麋鹿 2020-12-08 16:46

MySQL seems to have an 8 hour time out on its connections. I\'m running multiple WARs in Tomcat utilizing Hibernate for ORM. After 8 hours (i.e. overnight), I get broken pip

5条回答
  •  执念已碎
    2020-12-08 17:20

    I've several problem - - C3P0ConnectionProvider was not found - I solve it by using the hibernate c3p0 version

            org.hibernate
            hibernate-entitymanager
            3.5.6-Final
        
              
        
            org.hibernate
            hibernate-c3p0
            3.3.1.GA
        
    

    - I have that wait_timeout issue on mysql. First I set /etc/my.cnf wait_timeout=10 then I changed the Idle time out value to lower than the wait_timeout value which < 10 That solved my problem.

         
            
            
            
            
            
            
    

提交回复
热议问题