We recently switched from commons dbcp to tomcat dbcp and after 2-3 weeks another architect ran into an issue where his backend job would run into a resultset close issue. He was saying it started right about the time we made the switch and it happens only for long running jobs. That reminds me of something I had read about abandoned connections so I asked him to check after how many minutes it does this and it was 20min 1 sec. It seems I had added a property in dbcp dataSource.setLogAbandoned(true); dataSource.setRemoveAbandoned(true); dataSource.setRemoveAbandonedTimeout(1200); so first thing was to confirm if this was really the case because our transaction timeout for long running queries is also 20 min but that has been for ages so this abandoned was the only recent change. Finally I found logAbandoned would log into tomcat catalina.out ...