Hibernate, C3P0, Mysql Connection Pooling -


I recently switched Apache DBC connection pooling to C3P0 and to see that I have connection timeout problems I did not do this in the past with DBCP and Tomcat, so I am thinking that this is a configuration problem or a driver issue.

Whenever I waste the server for a while, I think some content will not be sent (as the server can not connect or do anything). When I refresh the page, all the contents are there.

Does anyone recommend using MySQL connection pool because I am using MySQL anyway? What are your experiences with the MySQL connection pool?

Walter

If you have a database of timeout connections after a certain time of inactivity , They are already closed and when borrowing from the pool, they are unusable

if you do not want to reconfigure your database server or not When you borrow from the pool, check the connection with the test query (C3P0 and other connections) G) can configure. You can find more detailed information in

Edit: Surely you are right, it is also possible that the maximum time allowed in the DBC pool was time pass, so that they get out before being removed from the pool. . Anyway, using a test question or to ensure that the connection is removed from the pool before the time expires, the problem should be fixed.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -