Connection pool problems

G

Guest

Hello,
In my program I am doing a lot of connections to the database one
after the other and retrieving lots of records from the database. However I
am getting the message below when sometimes running this program. It would
appear that I have too many connections open. Is there any way that I can get
around this, or increase the number of connections, or close connections
after they are used.

Thanx in advance
Geri

Additional information: Timeout expired. The timeout period elapsed prior
to obtaining a connection from the pool. This may have occurred because all
pooled connections were in use and max pool size was reached.
 
G

Guest

Geraldine,

According to the documentation, if you are using the SQL Server data
provider, you can specify the maximum pool size in the connection string.

I have not tried specifying this value, but it should be something like:

Max Pool Size=200

The default is 100.

Kerry Moorman
 
M

Mary Chipman [MSFT]

This question comes up a lot, and has generated many long-running
threads that you may want to take a look at. I'm not sure how far back
the history goes, but take a look at
microsoft.public.dotnet.framework.adonet. In particular look for
anything written by Pablo Castro or Angel Saenz-Badillo. Also take a
look at Angel's blog on http://weblogs.asp.net/angelsb/.

--Mary
 
G

Guest

I tried all of the things listed in Angel's log but nothing works. My
queries are not long-running. They are simple INSERT statements into a table
with a single index and no FK constraints. I create 25 threads that each
execute a single SQL INSERT statement. If I try to run my application over
and over, it fails. Perfmon shows that the number of pooled connections
never comes close to 100 connections which is the default max. One important
thing to note is that one of the fields I am inserting is 7000 bytes long. I
don't get this error nearly as often if I only insert data that isn't as wide.
 
C

Cor Ligthert

Brian,

For me this sounds more as a TimeOut question.

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

When you get no answer here, than I advice you to place this same question
in the newsgroup

Adonet
news://msnews.microsoft.com/microsoft.public.dotnet.framework.adonet

Web interface:
http://communities2.microsoft.com/c.../?dg=microsoft.public.dotnet.framework.adonet

With the same subject text as now.

Mostly Angel react in that newsgroup on any connection pooling problem and
handles it untill it works.

I hope this helps?

Cor
 
G

Guest

Timeout issue I believe (in addition to connection pool issues ?)
I just started getting this same error last week, now on 3 out of 15 client
machines.
It appears immediatly after a successful application specific login. One
connection was opened and closed for the login, then another is used to fill
a dataset.
On all machines it was preceded by a Crystal.Net Error. One, after running
fine for a week reported a missing Crystal DLL. After Re-Installing we got
this error AFTER the application is run once (for how-ever long you want with
as many CRUDs as you want) and then is tried to run again. One had a similar
error the first time it ran after installation. The other had the wrong
version of Framework at installation time and was re-installed after the
needed version of Framework.
Rebooting will allow you into the app again -AND- so will
re-installing the Crystal.NET merge modules... ?
Two of the Machines are on XP SP2, will learn about the 3rd machine
tomorrow.

This may not belong on this thread but since others and myself looked here
for it first I thought I would throw this out there too. I'm going to check
some other threads, treating my problem more as a timeout issue.
 

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

Similar Threads


Top