473,395 Members | 1,692 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,395 software developers and data experts.

All Pooled Connections In Use

SqlConnection.Open, from a web application, threw:

/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./

What would cause this error?
Nov 22 '05 #1
5 5859
I'm assuming that since you are asking this wuestion, you don't expect your
code to have a lot of concurrent open connections to your SQL data source.
I would quess that you are not closing your connections correctly when your
are finished with them and are running out of available connections.
"john bailo" <jb****@vestcom.com> wrote in message
news:24******************************@news.teranew s.com...
SqlConnection.Open, from a web application, threw:

/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./

What would cause this error?

Nov 22 '05 #2

"Michael Bird" <birdm @ symbol . com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I'm assuming that since you are asking this wuestion, you don't expect your code to have a lot of concurrent open connections to your SQL data source.
I would quess that you are not closing your connections correctly when your are finished with them and are running out of available connections.
Yes, and no. I guess I had to refine my ideas about what 'closing a
connection' means.
I was closing the mySqlConnection, but I did not dispose the mySqlCommand
however.

Now my squence after consuming a Connection/Command set is:

mySqlCommand.Dispose
mySqlConnection.Close
mySqlConnection.Dispose


"john bailo" <jb****@vestcom.com> wrote in message
news:24******************************@news.teranew s.com...
SqlConnection.Open, from a web application, threw:

/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./

What would cause this error?


Nov 22 '05 #3

"Michael Bird" <birdm @ symbol . com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I'm assuming that since you are asking this wuestion, you don't expect your code to have a lot of concurrent open connections to your SQL data source.
I would quess that you are not closing your connections correctly when your are finished with them and are running out of available connections.
Yes, and no. I guess I had to refine my ideas about what 'closing a
connection' means.
I was closing the mySqlConnection, but I did not dispose the mySqlCommand
however.

Now my squence after consuming a Connection/Command set is:

mySqlCommand.Dispose
mySqlConnection.Close
mySqlConnection.Dispose


"john bailo" <jb****@vestcom.com> wrote in message
news:24******************************@news.teranew s.com...
SqlConnection.Open, from a web application, threw:

/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./

What would cause this error?


Nov 22 '05 #4
John,
There is only one reason I can think of where adding command dispose would
seem to fix your problem, and since it does not really fix it I need to ask.
Are you closing your connection in a Finalizer (destructor)?

This is one of the most common problems with people starting to use the .net
framework and we have not done a very good job of putting out the message,
you cant use finalizers to clean up managed resources, period.

If you are disposing the connection in a finalizer you will get stress
related errors in production, this problem was so bad that I had to add the
following comment to SqlConnection Close documentation:
http://msdn.microsoft.com/library/de...sposetopic.asp
CAUTION Do not call Close or Dispose on a Connection, a DataReader, or
any other managed object in the Finalize method of your class. In a
finalizer, you should only release unmanaged resources that your class owns
directly. If your class does not own any unmanaged resources, do not include
a Finalize method in your class definition. For more information, see
Programming for Garbage Collection.

Hope this helped,
--
Angel Saenz-Badillos [MS] Managed Providers
This posting is provided "AS IS", with no warranties, and confers no
rights.Please do not send email directly to this alias.
This alias is for newsgroup purposes only.

"john bailo" <jb****@vestcom.com> wrote in message
news:31******************************@news.teranew s.com...

"Michael Bird" <birdm @ symbol . com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I'm assuming that since you are asking this wuestion, you don't expect

your
code to have a lot of concurrent open connections to your SQL data source. I would quess that you are not closing your connections correctly when

your
are finished with them and are running out of available connections.


Yes, and no. I guess I had to refine my ideas about what 'closing a
connection' means.
I was closing the mySqlConnection, but I did not dispose the mySqlCommand
however.

Now my squence after consuming a Connection/Command set is:

mySqlCommand.Dispose
mySqlConnection.Close
mySqlConnection.Dispose


"john bailo" <jb****@vestcom.com> wrote in message
news:24******************************@news.teranew s.com...
SqlConnection.Open, from a web application, threw:

/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./

What would cause this error?



Nov 22 '05 #5
John,
There is only one reason I can think of where adding command dispose would
seem to fix your problem, and since it does not really fix it I need to ask.
Are you closing your connection in a Finalizer (destructor)?

This is one of the most common problems with people starting to use the .net
framework and we have not done a very good job of putting out the message,
you cant use finalizers to clean up managed resources, period.

If you are disposing the connection in a finalizer you will get stress
related errors in production, this problem was so bad that I had to add the
following comment to SqlConnection Close documentation:
http://msdn.microsoft.com/library/de...sposetopic.asp
CAUTION Do not call Close or Dispose on a Connection, a DataReader, or
any other managed object in the Finalize method of your class. In a
finalizer, you should only release unmanaged resources that your class owns
directly. If your class does not own any unmanaged resources, do not include
a Finalize method in your class definition. For more information, see
Programming for Garbage Collection.

Hope this helped,
--
Angel Saenz-Badillos [MS] Managed Providers
This posting is provided "AS IS", with no warranties, and confers no
rights.Please do not send email directly to this alias.
This alias is for newsgroup purposes only.

"john bailo" <jb****@vestcom.com> wrote in message
news:31******************************@news.teranew s.com...

"Michael Bird" <birdm @ symbol . com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I'm assuming that since you are asking this wuestion, you don't expect

your
code to have a lot of concurrent open connections to your SQL data source. I would quess that you are not closing your connections correctly when

your
are finished with them and are running out of available connections.


Yes, and no. I guess I had to refine my ideas about what 'closing a
connection' means.
I was closing the mySqlConnection, but I did not dispose the mySqlCommand
however.

Now my squence after consuming a Connection/Command set is:

mySqlCommand.Dispose
mySqlConnection.Close
mySqlConnection.Dispose


"john bailo" <jb****@vestcom.com> wrote in message
news:24******************************@news.teranew s.com...
SqlConnection.Open, from a web application, threw:

/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./

What would cause this error?



Nov 22 '05 #6

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

Similar topics

0
by: LBS | last post by:
Hi hope someone can solve this one, I'm using a JNDI datasource to create pooled connections to a 9i DB. In my Java code I'm using an OracleConnectionCacheImpl to attache to this. My problem is...
3
by: john bailo | last post by:
SqlConnection.Open, from a web application, threw: /Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled...
3
by: User N | last post by:
I'm working on a proxy which must support at least a dozen simultaneous connections from local clients to remote servers. It is conceivable that someone might want to run it in non-local mode,...
2
by: dotNET Developer | last post by:
If this forum is the wrong place to discuss this issue please point me to the right forum... We have an ASP.NET application (InterNet app) originally written in .NET 1.0 running for about 2...
4
by: Guoqi Zheng | last post by:
Dear sir, I keep getting the following errors on one of my sites after clicking for many times. Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This...
2
by: Bob | last post by:
We have a production web site that's data intensive (save user input to DB and query for displaying) with the ASP.NET app part on one W2K server and SQL 2000 DB on another W2K server. I have set...
3
by: =?Utf-8?B?RFNJU3VwcG9ydA==?= | last post by:
I have an ASP.NET application runinng on IIS 5 .NET 1.1 Sp1 and recently we've been experiencing this error when the users are trying to print reports that connects to Oracle database. The only way...
1
by: ChrisMiddle10 | last post by:
Hey All, My subject says it all. I'd like to control how long the instance of my HttpHandler is pooled, but I'm not sure how and I can't find anything about it. Is it possible? If so, how? ...
1
by: Allan Ebdrup | last post by:
I have a web application (ASP.Net V2) that fetches stuff from the database. I've created a test project in Visual Studio 2005. In the webtest I fetch data from some webservices that query the...
1
by: jobs | last post by:
Re: Troubleshooting Timeout expired. All pooled connections were in use and max pool size was reached. New webservers. win2003. IIS6. asp.net 2.0/ sql server 2005 and Oracle 9i through a 64 bit...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.