I'm facing on my local machine (Windows 2000 advance server + SQL Server 7.0). its a site in asp.net. sometimes i recieve the message that connection timedout. When i check the number of connections in Performance Monitor, they had reached the max size of 100.
I think my problem lies in connections that remain open after the page is loaded. For example whenever I run a particular page(that shows a complex report), 14 more connections are added to User Connections in Performance Monitor.
Can anyone tell me why the connections remain open even after the page is executed? Shouldn't they be closed once the page is loaded and returned to the connection pool to be reused?
Any help/suggestion will be highly appreciated.
ThanksThey should. Can you show us the connection string you use? Also are you closing the command when you are finished? I use Microsoft Data Access Application Blocks to handle this, and most of the closing etc. is taken care of in that code.|||thanks for the quick response.
Here is the connection string that i have in my web.config file:
<appSettings>
<add key="DB" value="server='P4'; user id='sa'; password=''; database='myDB'" /
I'm not closing the command but i'm closing the connections:
MyCommand.Connection.Close()
what do you think?|||Hi,
I added the following to my connection string "pooling=false" and it seems to have solved the problem. Performance Monitor shows that connections to database are freed when a new request is recieved by the server.
But I have read that "pooling=false" is not recommended by microsoft!!! Can someone please shed some light on this.
Thanks|||I know I've set pooling to false for one application, and it has not been a problem. This is an intranet application and I had to do this because the application was failing occaisionally. Turning pooling off turned out to be the simplest way to fix it.
I think scalability is the reason that microsoft does not recommend this. Since our application is admin app that's only going to be used by maximum 10 people, that's not an issue. HTH|||Thanks for the information. Can you give me some link to any resource related to the use of connection pooling since my application is suppose to be used by users all over the world.