java - Database connection timeout -


I have read so many articles on the Internet about this problem but there is no clear solution. Please tell me a definite answer to why I am getting the database expired. The app is a GWT app that is hosted on the Tomcat 5.5 server. I use spring and the session function is created in AppContext.xml as

   & Lt; Property Name = "AdminPassword" value = "$ {admin.user.password}" /> & Lt; Property name = "god username" value = "$ {god.user.name}" /> & Lt; Property Name = "God Password" Value = "$ {god.user.password}" /> & Lt; / Bean & gt;  

All tasks work the next day untile:

  information | Jvm 1 | 2010-06-15 14:42:27 | 2010-06-15 18: 42: 27,804 Warne [JDBCpress Repeater]: SQL Error: 0, AscaleState: 08S 001 Information | Jvm 1 | 2010-06-15 14:42:27 | 2010-06-15 18:42: 27,821 Error [JDBCExceptionReporter]: The last packet was successfully received from the server 38729 seconds ago. Last packet was successfully sent to server 38729 seconds ago, which is more than the server configured value 'wait_timeout'. To avoid this problem, you must increase the server's configured values ​​for client timeouts, or use the connector / j connection property 'autoReconnect = true' before using it in your application before the validity of the connection and / or Should test. Information | Jvm 1 | 2010-06-15 14:42:27 | June 15, 2010 6:42:27 PM org.apache.catalina.core.ApplicationContext log INFO | Jvm 1 | 2010-06-15 14:42:27 | Sewer: Exceptions during sending incoming RPC calls  

I have read many things (none of them works), please

view this link

  in "hibernate.cfg.xml": & lt ;! - hibernate.cfg.xml - & gt; & Lt; Property Name = "c3p0.min_size" & gt; 5 & ​​lt; / Property & gt; & Lt; Property Name = "c3p0.max_size" & gt; 20 & lt; / Property & gt; & Lt; Property Name = "c3p0.timeout" & gt; 1800 & lt; / Property & gt; & Lt; Property Name = "c3p0.max_statements" & gt; 50 & lt; / Property & gt; & Lt; Property Name = "connection.provider_class" & gt; Org.hibernate.connection.C3P0ConnectionProvider & lt; / Property & gt; & Lt ;! - No "connection.pool_size" entry! - & gt; Then make a file "c3p0.properties" that should be in the root of the cell spaces (i.e. there is no way to override it for any particular part):  < Pre>  # c3p0.properties c3p0.testConnectionOnCheckout = true  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -