scalar-labs/btm

Unable to get a connection from pool of a PoolingDataSource

Closed this issue · 1 comments

I have deployed web application in Tomcat7. Everything was working fine for past 1 year. Now out of sudden I am getting this exception.
java.sql.SQLException: unable to get a connection from pool of a PoolingDataSource containing an XAPool of resource 5GV0UH57 with 1 connection(s) (1 still available) -failed-

Any thoughts on why this is happening ?

Your PoolingDataSource has the failed marker set, hence it refuses to serve connections while it stays in that state.

There a two ways the state can be set to failed:

  • someone manually marked the pool as failed via the setFailed() method or via the JMX MBean
  • the recoverer failed got some exception while doing its job on that resource so it marked it as failed

In the case of transient errors, the next recoverer scan would clean the flag so the pool would stay unavailable only for a configurable time (60 seconds by default IIRC). In all cases, the recoverer prints logs indicating why marked a resource as failed, that is where you should start figuring out what's going on.