Connection Pooling.

T

tshad

We are having quite a problem with the Connection Pool filling up. I have
tried restarting the website and IIS both and that doesn't seem to solve the
problem. I still have to wait until the Garbage Collector does its thing.
I would have thought by shutting down IIS and restarting it would free the
connections, but that doesn't seem to be the case.

I was told that I can help the situation by increasing the Pool size by
changing my Connection String from:

"Persist Security Info=False;Data Source=Interez;Initial
Catalog=InterezData;User ID=xxxx;Password=xxxx;"

To:

"Persist Security Info=False;Data Source=Interez;Initial
Catalog=InterezData;User ID=xxxx;Password=xxxx;Min Pool Size=5;Max Pool
Size=100;"

A couple of questions.

Why do I need this on my connection string? Doesn't this need to only be
set once? This string is called each time I access the database.

I was told the default was 40 - is that correct?

Why do I need the Min Pool size?

Also, what do I gain by using 100 instead of 300? Will that slow the
response down?

Thanks,

Tom
 
G

Guest

tshad said:
We are having quite a problem with the Connection Pool filling up. I have
tried restarting the website and IIS both and that doesn't seem to solve the
problem. I still have to wait until the Garbage Collector does its thing.
I would have thought by shutting down IIS and restarting it would free the
connections, but that doesn't seem to be the case.

I was told that I can help the situation by increasing the Pool size by
changing my Connection String from:

"Persist Security Info=False;Data Source=Interez;Initial
Catalog=InterezData;User ID=xxxx;Password=xxxx;"

To:

"Persist Security Info=False;Data Source=Interez;Initial
Catalog=InterezData;User ID=xxxx;Password=xxxx;Min Pool Size=5;Max Pool
Size=100;"

A couple of questions.

Why do I need this on my connection string? Doesn't this need to only be
set once? This string is called each time I access the database.

I was told the default was 40 - is that correct?

Why do I need the Min Pool size?

Also, what do I gain by using 100 instead of 300? Will that slow the
response down?

Thanks,

Tom

Hello Tom,

assuming that you are using MS SQL Server you maybe should have a look at
this:

http://msdn.microsoft.com/library/d...nectionPoolingForSQLServerNETDataProvider.asp

Since it looks like you are always using the same connection string I would
first make sure that you are closing connections after using them to release
them back into the pool. For that you have to call connection.close or
..dispose

Hth,

Kostja
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,233
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top