views:

360

answers:

1

We have a struts web application that is deployed on sun applicaition server that despite doing load test / system integrating test in development environments. There is no scenario of conneciton leak.

But however in the production environment. There seen to be connection leak as the connection in used keep on increasing.

Beside application codes, what other scenario could cause connection leak?

A: 

How do you measure this? Are you looking at the number of connections in the database? The size of the pool in the app server? Which database are you using?

I don't understand "There is no scenario of conneciton [sic] leak." If you aren't properly closing all your ResultSets, Statements, and Connections (in individual try/catch blocks in a finally block in method scope, in reverse order of instantiation) you might experience leaks.

Unless there's another application that is using the same database, it's got to be your code or the app server. If you're in deep denial about your code, try switching app servers and see if that helps.

I'd suggest that your test scenarios aren't realistic. If you don't observe this behavior in production, either your tests aren't triggering the behavior or the test and prod deployments are not identical.

duffymo