473,396 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Connection pool problems

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.
Nov 21 '05 #1
5 2225
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
"Geraldine Hobley" wrote:
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.

Nov 21 '05 #2
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

On Tue, 8 Feb 2005 09:33:09 -0800, "Geraldine Hobley"
<Ge*************@discussions.microsoft.com> wrote:
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.


Nov 21 '05 #3
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.

"Mary Chipman [MSFT]" wrote:
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

On Tue, 8 Feb 2005 09:33:09 -0800, "Geraldine Hobley"
<Ge*************@discussions.microsoft.com> wrote:
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.


Nov 21 '05 #4
Brian,

For me this sounds more as a TimeOut question.

http://msdn.microsoft.com/library/de...meouttopic.asp

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

Adonet
news://msnews.microsoft.com/microsof...amework.adonet

Web interface:
http://communities2.microsoft.com/co...amework.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
Nov 21 '05 #5

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.

"Cor Ligthert" wrote:
Brian,

For me this sounds more as a TimeOut question.

http://msdn.microsoft.com/library/de...meouttopic.asp

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

Adonet
news://msnews.microsoft.com/microsof...amework.adonet

Web interface:
http://communities2.microsoft.com/co...amework.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

Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: greg | last post by:
Hi We have w2k, iis5, .NET/c# I periodically receive this message and the system freezes ++++++++++++++++++++++++++++++++++++++++++++++++++ Timeout expired. The timeout period elapsed...
2
by: Jim Heavey | last post by:
How do I set up a Connection Pool? How can I look on the server and see how many connections are being used by my application? I am pretty sure that my application must be leaving connections...
1
by: Lloyd Sheen | last post by:
I am running into the connection pool running out of connections problem. Error msg is : Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have...
1
by: ugurceng | last post by:
Hi everbody , I need more info about connection pooling , We are developing a CRM project with ASP.NET and when more users connect to the MS SQL DB at the same time , which problems would be...
6
by: DraguVaso | last post by:
Hi, I had an error concerning the connection-pool: "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled...
17
by: Alan Silver | last post by:
Hello, I have a generic method in a utility class that grabs an sqldatareader and returns it. Due to the fact that (AFAIK), you can't close the database connection before you've read the data,...
3
by: Martin B | last post by:
Hallo! I'm working with C# .NET 2.0, implementing Client/Server Applications which are connecting via Network to SQL-Server or Oracle Databases. To stay independent from the underlaying Database...
29
by: Bryce K. Nielsen | last post by:
Suddenly this week, I've started getting this error message: System.Data.SqlClient.SqlConnection(GetOpenConnection)ExecuteNonQuery requires an open and available Connection. The connection's...
16
by: crbd98 | last post by:
Hello All, Some time ago, I implemented a data access layer that included a simple connectin pool. At the time, I did it all by myself: I created N connections, each connection associated with...
20
by: fniles | last post by:
I am using VS2003 and connecting to MS Access database. When using a connection pooling (every time I open the OLEDBCONNECTION I use the exact matching connection string), 1. how can I know how...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.