473,320 Members | 2,071 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,320 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 5857
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.