title: In-use connections equal max-pool-size and expired max-wait-time. Cannot allocate more connections
body: <p>I am facing following problem with an <code>HTTP 500</code> status.</p>
  
  <p>Message description:</p>
  
  <blockquote>
    <p>The server encountered an internal error () that prevented it from
    fulfilling this request.</p>
  </blockquote>
  
  <p>Exception:</p>
  
  <blockquote>
    <p>javax.servlet.ServletException: java.sql.SQLException: Error in
    allocating a connection. Cause: In-use connections equal max-pool-size
    and expired max-wait-time. Cannot allocate more connections.</p>
  </blockquote>
  
  <p>Root cause:</p>
  
  <blockquote>
    <p>java.sql.SQLException: Error in allocating a connection. Cause: In-use
    connections equal max-pool-size and expired max-wait-time. Cannot
    allocate more connections.</p>
    
    <p>note The full stack traces of the exception and its root causes are
    available in the GlassFish v3 logs. GlassFish v3</p>
  </blockquote>