PC Review


Reply
Thread Tools Rate Thread

Connection pooling not working?

 
 
Chris Smith
Guest
Posts: n/a
 
      26th Dec 2008
I have an ASP.NET 2 web application page that connects to the same remote
SQL7 database 10 times when it loads. It opens the connection, executes a
stored procedure, closes the connection and then repeats the procedure for
the next connection. (There is a genuine reason why the connection object
isn't re-used each time.) However if I look at a Performance Monitor trace
(.NET database counters) and time how long it takes to connect to the
database then connection pooling only seems to work if 'Connection
Reset=false' in the connection string.

The connection string is identical each time and is as follows:
Initial Catalog=MyDatabase; Data Source=MyServer; Connect Timeout=30;
integrated security=SSPI;persist security info=False;Trusted_Connection=Yes;
Application Name=MyApplication; Pooling=true; Connection Reset=true; Min
Pool Size=5

If I just change the value of Connection Reset then the behaviour is as
follows:
TRUE - Performance Monitor shows HardConnectsPerSecond increasing for each
database connection and connecting to the database takes > 0.2 seconds. It
increases every time the page loads and not just the first time, even if
there is only a few seconds delay between page loads.
HardDisconnectsPerSecond also indicates that the connections are dropped as
soon as the database connection is closed.
FALSE - HardConnectsPerSecond remains at zero each time (after first time)
and connecting to the database takes < 5 ms.

Can someone help me understand why Connection Reset causes this behaviour as
if the connection is being disconnected? (I understand the purpose of
resetting the connection and what it does.) I want to set the value to true
but I also need good performance.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection pooling not working Chris Smith Microsoft ASP .NET 0 9th Dec 2008 06:49 PM
Connection pooling parameters not working for Oracle connection yoram.ayalon@structuredweb.com Microsoft ADO .NET 1 29th Sep 2006 09:36 PM
Connection Pooling Not Working Correctly Activator8 Microsoft ADO .NET 0 3rd May 2004 11:44 PM
How do I turn off connection pooling in a connection string corbett Microsoft Dot NET 1 6th Jan 2004 11:36 PM
Connection Pooling is not working Marco Roberto Microsoft ADO .NET 2 30th Sep 2003 12:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:18 PM.