This is what is our PROD scenario:
- We are using
org.apache.tomcat.jdbc.pool.DataSourceFactoryand having maxAge of900000andmaxActiveof100. - We have long database operation and it is failing because of database connection closed exception.
- When I checked the logs then I found that this exception is occurring after ~15 minutes.
So, this makes me wonder if this is because of maxAge of 900000. I read the docs of Apache and other blogs but no where I could find a clear answer whether maxAge will impact an active database connection or not.
From the docs only thing I am 100% sure of is that maxAge is checked when moving a database connection in or out of the pool, but I not sure on what happens once database connection is in use...
Has anyone having similar experience with this or knows if maxAge impacts an active connection or not?
UPDATE 1:
I am using Tomcat 8.5