title: Tomcat JDBC Connection Pool - Connections stuck on active
body: <p>My application uses Tomcat JDBC connection pool, with MySQL DB.<br>
  Seems like a process that run during the night (anti virus scan?) cause the memory and CPU on the machine to increase, and as a result connections from the pool stuck on active until the connection pool can't response to any connection request.  </p>
  
  <p>I'm getting errors like: </p>
  
  <ul>
  <li><p><code>com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after statement closed</code>.</p></li>
  <li><p><code>Timeout: Pool empty. Unable to fetch a connection in 10 seconds, none available[size:100; busy:97; idle:0; lastwait:10000]. (That's weird, where are the remaining 3?)</code>  </p></li>
  </ul>
  
  <p>Looking at a chart I'm generating describing the active connection state, it is flat until at some point it start increasing until it reach the maximum and stays there.<br>
  My connection pool is configure to remove unclosed connections (<code>setRemoveAbandoned = true</code>).  </p>
  
  <p>Do you have any idea how can I solve this issue?</p>