Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You should really go for C3P0 connection pooling: <a href="http://www.mchange.com/projects/c3p0/index.html#hibernate-specific">http://www.mchange.com/projects/c3p0/index.html#hibernate-specific</a></p> <p>There is a section in C3P0 documentation on that subject: <a href="http://www.mchange.com/projects/c3p0/index.html#configuring_recovery">http://www.mchange.com/projects/c3p0/index.html#configuring_recovery</a></p> <p>First you have to properly configure c3p0, which in case of using hibernate must happen in c3p0.properties file.</p> <p>In your c3p0.properties put these properties to retry to reconnect indefinitely every 3 seconds when database is down:</p> <pre><code>c3p0.acquireRetryAttempts = 0 c3p0.acquireRetryDelay = 3000 c3p0.breakAfterAcquireFailure = false </code></pre> <p>Also, to avoid broken connections lying in your pool indefinitely, use connection age management:</p> <pre><code>c3p0.maxConnectionAge = 6000 c3p0.maxIdleTime = 6000 c3p0.maxIdleTimeExcessConnections = 1800 c3p0.idleConnectionTestPeriod = 3600 </code></pre> <p>These may be quite expensive, but helpful if above is not enough:</p> <pre><code>c3p0.testConnectionOnCheckout = true c3p0.preferredTestQuery = SELECT 1; </code></pre> <p>You may also want to check for connection leaks which prevent recovery:</p> <pre><code>c3p0.debugUnreturnedConnectionStackTraces = true </code></pre> <p>And finally, make sure that C3P0 is hooked with hibernate correctly, enable debug logging for "com.mchange" package and see if C3P0 tells you anything about itself. It should state configuration properties which are loaded, so see if it's all there. </p> <p>I hope this helps.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload