I am seeing some bizarre connection issues that seem to stem from my c3p0 connection pool. Basically I start up my web app, the connection pool gets created with 10 connections to the sql server database, and everything is fine to start with. Then after some use, only some of the connections start returning fewer results than expected for the exact same query. So, for example I have a query that normally returns 41 results. But if I happen to get one of these bad connections, it might return just 1 result or just 10 results. And that bad connection will consistently return only X number of results.

 

I can identify the bad connections and kill them individually, but the problem seems to resurface again over time. It doesn’t appear to be a problem with sql server because I can open numerous connections using another program and never reproduce this behavior.

 

I am really at a loss about how this could happen. Any ideas would be much appreciated. I am using c3p0 v0.9.0 and sql server 2005.

 

Thanks,

Ben