Sunday, March 25, 2012

Connection pooling problem

Can anybody help me to solve this problem

I have a web application. In this app i have one class genral for database transections. I create new object of this class on every page in page load event & dispose it on UnLoad event. After sometime this app gives connection pooling exception.

Means connection are not closed, but i disposed the object like

tmpDatabase.Dispose()
tmpDatabase = Nothing

Plz can anybody tell me the mistake i m doing.

ThanxPersonally, I would contruct the object as late as possible (where needed) and destroy the object as soon as possible, and let connection pooling work as designed.

Perhaps there is som error condition that you are not handling, so that the dispose is sometimes not reached.|||I can see using Break point, it destroying the object. Means cursor reaching to the line where the object is destroyed.|||Please Help me

This is big problem for my application. I dont know what i doing wrong.|||"This is big problem for my application. I dont know what i doing wrong."

We do not either. In general, there is some reason why your connections are not being closed. Could be an error condition not properly handled, could be a design problem. Absent seeing much of the code, and absent you taking my advice to make the Open and Close very close to each other, leaving the connection open for as short a time as possible rather than creating one for a page load/unload cycle, I do not think anyone can help you.

No comments:

Post a Comment