Hi guys,
I'm having this problem with my ASP.Net application:
I was testing the whole site, and it seem to work fine. Fast and
stable, but suddenly it stopped working and this error occurred:
"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 could be the cause? Every time I use a dataReader I'm pretty sure
I'm closing it.
Thanks in advance,
Dam 5 3042
Hi,
Seems all connections in the pool are in use. You can control the number of
connections in the pool changing connection string. For MSSQL, use mix pool
size= and max pool size=
Visit http://msdn.microsoft.com/library/de...taprovider.asp
for more info. Also make sure you're closing reader/connection as soon as
the data has been populated/retreived.
--
Milosz Skalecki
MCP, MCAD
"DaM" wrote: Hi guys,
I'm having this problem with my ASP.Net application:
I was testing the whole site, and it seem to work fine. Fast and stable, but suddenly it stopped working and this error occurred:
"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 could be the cause? Every time I use a dataReader I'm pretty sure I'm closing it.
Thanks in advance, Dam
Make sure you are closing both your connection and your datareader.
Make sure you are doing this in the Finally block
run sp_who in SQL Server to see who's connected
Check out: http://www.15seconds.com/issue/040830.htm
for more ideas...
Karl
--
MY ASP.Net tutorials http://www.openmymind.net/ - New and Improved (yes, the popup is annoying) http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"DaM" <dl******@gmail .com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. . Hi guys,
I'm having this problem with my ASP.Net application:
I was testing the whole site, and it seem to work fine. Fast and stable, but suddenly it stopped working and this error occurred:
"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 could be the cause? Every time I use a dataReader I'm pretty sure I'm closing it.
Thanks in advance, Dam
Sorry, not "mix pool size" but "max pool size" :D
--
Milosz Skalecki
MCP, MCAD
"Milosz Skalecki" wrote: Hi,
Seems all connections in the pool are in use. You can control the number of connections in the pool changing connection string. For MSSQL, use mix pool size= and max pool size= Visit http://msdn.microsoft.com/library/de...taprovider.asp for more info. Also make sure you're closing reader/connection as soon as the data has been populated/retreived.
-- Milosz Skalecki MCP, MCAD
"DaM" wrote:
Hi guys,
I'm having this problem with my ASP.Net application:
I was testing the whole site, and it seem to work fine. Fast and stable, but suddenly it stopped working and this error occurred:
"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 could be the cause? Every time I use a dataReader I'm pretty sure I'm closing it.
Thanks in advance, Dam
Hi Dam,
First of all, "pretty sure" is never sure enough! But let's assume for a
moment that you ARE closing all of your DataReaders.
There are a limited number of database connections available in any
Connection Pool. These Connections are created as needed, until the Maximum
Pool Size is reached. There is one Connection Pool created for each unique
Connection String used. When a database operation is requested, the
Connection String used is checked against the available Connection Pools. If
an existing Connection is available, it is re-used. If there are no
Connections available, the request is queued until either a Connection is
released, or the Timeout period expires.
A Connection is released not by closing a DataReader only, but by closing a
Connection object. Closing a DataReader releases the Connection object from
the DataReader, but does not close it. A Connection is released when you
call Close or Dispose on the Connection object.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
"DaM" <dl******@gmail .com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. . Hi guys,
I'm having this problem with my ASP.Net application:
I was testing the whole site, and it seem to work fine. Fast and stable, but suddenly it stopped working and this error occurred:
"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 could be the cause? Every time I use a dataReader I'm pretty sure I'm closing it.
Thanks in advance, Dam
You can always use ExecuteReader(C ommandBehaviour .Close) to close connection
automatically when calling IdbDataReader.C lose().
--
Milosz Skalecki
MCP, MCAD
"Kevin Spencer" wrote: Hi Dam,
First of all, "pretty sure" is never sure enough! But let's assume for a moment that you ARE closing all of your DataReaders.
There are a limited number of database connections available in any Connection Pool. These Connections are created as needed, until the Maximum Pool Size is reached. There is one Connection Pool created for each unique Connection String used. When a database operation is requested, the Connection String used is checked against the available Connection Pools. If an existing Connection is available, it is re-used. If there are no Connections available, the request is queued until either a Connection is released, or the Timeout period expires.
A Connection is released not by closing a DataReader only, but by closing a Connection object. Closing a DataReader releases the Connection object from the DataReader, but does not close it. A Connection is released when you call Close or Dispose on the Connection object.
-- HTH,
Kevin Spencer Microsoft MVP ..Net Developer Neither a follower nor a lender be.
"DaM" <dl******@gmail .com> wrote in message news:11******** **************@ o13g2000cwo.goo glegroups.com.. . Hi guys,
I'm having this problem with my ASP.Net application:
I was testing the whole site, and it seem to work fine. Fast and stable, but suddenly it stopped working and this error occurred:
"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 could be the cause? Every time I use a dataReader I'm pretty sure I'm closing it.
Thanks in advance, Dam This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mahesh D. Rane |
last post by:
Hi,
I am connecting to sql databse from windows C# form.
when i close the form, then also the connection to databse
is active. Its not allowing me to delete the database.
But if i close the complete application, then databse is
delete successfully.
ANy solution ?
Regards,
|
by: David Sworder |
last post by:
Hi,
I'm developing an application that will support several thousand
simultaneous connections on the server-side. I'm trying to maximize
throughput. The client (WinForms) and server communicate via a socket
connection (no remoting, no ASP.NET). The client sends a message to the
server that contains some instructions and the server responds in an
asynchronous fashion. In other words, the client doesn't block while waiting
for the...
|
by: Suhail Salman |
last post by:
Dear All,
i got the following error message in an applications that opens 13
threads and all of them calling a stored procedure which retreieves data
from SQLServer and fills them to a table the error appears at the following
statment
sqlda.Fill(dtMessages);
During an infinit loopp
|
by: pradeep_TP |
last post by:
Hi all,
I have a few questions that I have been wanting to ask for long. These are
all related to ADO.net and specifically to conenction to database.
1) If I have opened a connection to a database through Connection.open()
method, and I do not use Connection.close() method, will garbage collector
collect the connection object just because i am not using it any more.
2) I am using a dataset, in which i make some modifications to the...
|
by: ra294 |
last post by:
I have an ASP.net application using SQL Server 2000 that every once in a
while I am getting this error:
"System.InvalidOperationException: 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"
I looked at my code and It seems that I do close every connection that I
open so I don't know why I am getting...
| |
by: mingki |
last post by:
Hi Developers,
I am a .Net developer of a Large Online Retailling Company. I would
like to have your help on a Connection Pool issue.
Recently we have developed a Web Application on ODP .Net to work with
Oracle Database 10g. To gain the performance, connection pool enable is
a must. Everything work fine throughout the development period and the
performance is Great, however while the Web Application is deployed to
the production,...
|
by: PH |
last post by:
Hi;
I got an application written in ASP.NET (VB.NET and C#) that uses
connection pooling.
The Max connections defined in the connection command are 50, and there
are no more than 3 or 4 user using the application (intranet).
I very carefully open the connections in the LOAD event and close them
in the PreRender event.
Usually I got only one connection opened per FORM.
|
by: Steven Blair |
last post by:
As I understand it, if I create a connection object in my application
and close the connection, the next time I open a connection with the
same connection string I should be using a pooled connection?
Is this possible over different instances of a class.
For example
Instance 1 of my dll is alive and creates a connection to a Database.
The class goes out of scope (I have closed the connection by this stage)
|
by: RyoSaeba |
last post by:
Hello,
I have a problem with the session state set to Sql Server (AspNet 1.1,
Windows Server 2003 on an Application Center cluster, Sql Server 2000
on another server).
Sometimes, when many user are using the application, we got this
error:
"System.Web.HttpException: Unable to connect to SQL Server session
database. ---System.InvalidOperationException: Timeout expired. The
timeout period elapsed prior to obtaining a connection from the...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |