473,765 Members | 2,024 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Timeout / Obtaining a connection from the pool - Please Help!

Dear Group

Sorry for posting this here. I'm desperate for a solution to this
problem and thought some of you might have come across it with .NET
and SQL Server.
Let's assume I've the following code:

Private Sub Button4_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button4.Click

Dim sqlConnection As New System.Data.Sql Client.SqlConne ction

sqlConnection.C onnectionString = "workstatio n id=THEINTREPIDF OX;packet
size=4096;user id=sa;data source=""(local )"";p" & _
"ersist security info=False;init ial catalog=TestDB"

sqlConnection.O pen()
sqlConnection.C lose()
sqlConnection = Nothing

End Sub

When I click 100 times on the button the page finally times out with:

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.

Of course I could increase the max pool size but this isn't the
solution to this problem. I wonder what's wrong with my code?
According to MSDN, if the connection is closed it's released back into
the pool. Also tried to dispose but nothing helps. It looks like that
it keeps connections and doesn't release them. I'm grateful for any
hints, ideas, suggestions on this problem as I'm very desperate to
solve this.

Thanks very much for your time & efforts!

Martin
Jul 20 '05 #1
5 5711
Martin (th************ @hotmail.com) writes:
Sorry for posting this here. I'm desperate for a solution to this
problem and thought some of you might have come across it with .NET
and SQL Server.


I don't have an answer, but then again, this is an SQL Server
newsgroup and not an .Net group. There are specific groups for ADO
..Net, at least in microsoft.publi c.*. You might have better luck
there.
--
Erland Sommarskog, SQL Server MVP, so****@algonet. se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2
"Martin" <th************ @hotmail.com> wrote in message
news:72******** *************** ***@posting.goo gle.com...
| Dear Group
|
| Sorry for posting this here. I'm desperate for a solution to this
| problem and thought some of you might have come across it with .NET
| and SQL Server.
| Let's assume I've the following code:
|
| Private Sub Button4_Click(B yVal sender As System.Object, ByVal e As
| System.EventArg s) Handles Button4.Click
|
| Dim sqlConnection As New System.Data.Sql Client.SqlConne ction
|
| sqlConnection.C onnectionString = "workstatio n id=THEINTREPIDF OX;packet
| size=4096;user id=sa;data source=""(local )"";p" & _
| "ersist security info=False;init ial catalog=TestDB"
|
| sqlConnection.O pen()
| sqlConnection.C lose()
| sqlConnection = Nothing
|
| End Sub
|
| When I click 100 times on the button the page finally times out with:
|
| 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.
|
| Of course I could increase the max pool size but this isn't the
| solution to this problem. I wonder what's wrong with my code?
| According to MSDN, if the connection is closed it's released back into
| the pool. Also tried to dispose but nothing helps. It looks like that
| it keeps connections and doesn't release them. I'm grateful for any
| hints, ideas, suggestions on this problem as I'm very desperate to
| solve this.
|
| Thanks very much for your time & efforts!
|
| Martin
Martin,

Hope this helps:

http://support.microsoft.com/default...b;en-us;308047

Dan

Jul 20 '05 #3
Daniel A. Thomas (dathomas@--spam--istar.ca) writes:
Hope this helps:

http://support.microsoft.com/default...b;en-us;308047


This article describes to open an ADO record set from .Net. It seems
to me that Martin was having problems with SqlClient ADO .Net. ADO
and ADO .Net may have similar-looking names, but they are very different.
:-)
--
Erland Sommarskog, SQL Server MVP, so****@algonet. se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #4
"Martin" <th************ @hotmail.com> wrote in message
news:72******** *************** ***@posting.goo gle.com...
| Dear Group
|
| Sorry for posting this here. I'm desperate for a solution to this
| problem and thought some of you might have come across it with .NET
| and SQL Server.
| Let's assume I've the following code:
|
| Private Sub Button4_Click(B yVal sender As System.Object, ByVal e As
| System.EventArg s) Handles Button4.Click
|
| Dim sqlConnection As New System.Data.Sql Client.SqlConne ction
|
| sqlConnection.C onnectionString = "workstatio n id=THEINTREPIDF OX;packet
| size=4096;user id=sa;data source=""(local )"";p" & _
| "ersist security info=False;init ial catalog=TestDB"
|
| sqlConnection.O pen()
| sqlConnection.C lose()
| sqlConnection = Nothing
|
| End Sub
|
| When I click 100 times on the button the page finally times out with:
|
| 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.
|
| Of course I could increase the max pool size but this isn't the
| solution to this problem. I wonder what's wrong with my code?
| According to MSDN, if the connection is closed it's released back into
| the pool. Also tried to dispose but nothing helps. It looks like that
| it keeps connections and doesn't release them. I'm grateful for any
| hints, ideas, suggestions on this problem as I'm very desperate to
| solve this.
|
| Thanks very much for your time & efforts!
|
| Martin

Hi Martin,

As Erland Sommarskog pointed out I've pointed you to ADO and not
ADO.NET Sorry 'bout that one. So first things first remove the
ADO coding "sqlConnect ion = Nothing".

Here is the working hypothesis ...
As your connect strings specifies "Persist Security Info=False;"(de fault=
false)security information is never returned. In addition, Integrated
Security is
false by default and when false, User ID and Password are specified in the
connection. The result is an exact match with an existing connection pool
object
is never possible and the connections in the pool are not being reused.

You might try adding "Integrated Security=SSPI;" to your connect string.
When set to "SSPI" Windows account credentials are used for
authentication.

If this unacceptable add "Pooling=False; " to your connect string. This
defeats
the performance enhancements of connection pooling but the Timeout error
will go.

Some of this information is contained in the following two articles at:

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

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

Of course there's always plain old vanilla ADO.

:-)
Dan

Jul 20 '05 #5
Thanks guys for having a look at this anyway!
M
Jul 20 '05 #6

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

Similar topics

0
1802
by: Silvia | last post by:
I have a application web and when execute this for a long time generated this error: Server Error in '/RAIMServer' Application. ----------------------------------------------------------- --------------------- 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
3
11096
by: Kamalanathan T. | last post by:
Hi, We have developed an Web application in ASP.NET with C# and we r using SQL Server 2000. We get the Timeout expired error, when more than 300 concurrent users hit the site. I hagone thru the code, to check whether all the Connections are closed. everything is perfect, and infact the connections are closed in the finally block.
1
1145
by: Martin | last post by:
Dear Group I'm desperate for a solution to this problem. Let's assume I've the following code: Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Dim sqlConnection As New System.Data.SqlClient.SqlConnection
4
23186
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 may have occurred because all pooled connections were in use and max pool size was reached. Below is my code. Any help will be appreciated.
4
4380
by: Nevyn Twyll | last post by:
I've been working on an asp.net application and everything's been great. But suddenly, whether I'm tyring to use a database on my own machine, or on my server, I'm getting a timeout when trying to open a database connection. The error seems to happen regardless of what ASP.NET app I'm working with/trying to debug. It will open a few connections, Here's the error:
1
1761
by: UJ | last post by:
We have recently started getting the following error message: 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. This is on a connection.open command. Our ISP is providing the web machine and has many customers on it so I can't really tell if it's us or some other customer that is causing the...
1
11059
by: Jake K | last post by:
I have a system timer that elapses every 10 seconds and must execute every ten seconds. Basically every 10 seconds I need to insert into a table. The following code, however, causes a "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." error at cn.open() after about 2 minutes of executing. private...
7
2771
by: =?Utf-8?B?Sm9obiBTdGFnZ3M=?= | last post by:
Hello, Please read this all before giving an answer :) I'm doing some troubleshooting on a web application that my company wrote. It's written in asp.net 1.1. The error that the Event viewer gives is: 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.
2
12617
by: anumsajeel | last post by:
Hi, Error Message:- error connecting: 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. Target Site:- MySql.Data.MySqlClient.Driver GetConnection() Error Source:- MySql.Data
0
9568
marktang
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...
0
9399
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10007
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 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...
1
9957
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,...
0
9835
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7379
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
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();...
0
5276
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...
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.