473,597 Members | 2,342 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using a connection pool for SQL Server ASP.NET 1.1 Session managem

Hi!
Is it correct/safe to define a connection pool in the string
"sqlConnectionS tring" of the "sessionSta te" section of Web.config?
- The application is developed using AspNet 1.1 in a Windows Server 2003.
- The AspState DB is defined in a Sql Server 2000 DB on another server.

I have added this definition to the Web.config file:

<sessionState
mode="SQLServer "
sqlConnectionSt ring="data source=xxx.xxx. xxx;user
id=xxx;password =xxx;connection reset = true;connection lifetime =
15;enlist=true; min pool size=1;max pool size=200;"
cookieless="fal se"
timeout="2" />

but, when many users are using the application, sometimes I get this error:
"System.Web.Htt pException: Unable to connect to SQL Server session database.
---System.InvalidO perationExcepti on: 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."

Thanks in advance!

Oct 6 '06 #1
2 9798
We had the same issue , we increased the max to 999 , then we stop getting
htis error.

"JoeSep" <Jo****@discuss ions.microsoft. comwrote in message
news:27******** *************** ***********@mic rosoft.com...
Hi!
Is it correct/safe to define a connection pool in the string
"sqlConnectionS tring" of the "sessionSta te" section of Web.config?
- The application is developed using AspNet 1.1 in a Windows Server 2003.
- The AspState DB is defined in a Sql Server 2000 DB on another server.

I have added this definition to the Web.config file:

<sessionState
mode="SQLServer "
sqlConnectionSt ring="data source=xxx.xxx. xxx;user
id=xxx;password =xxx;connection reset = true;connection lifetime =
15;enlist=true; min pool size=1;max pool size=200;"
cookieless="fal se"
timeout="2" />

but, when many users are using the application, sometimes I get this
error:
"System.Web.Htt pException: Unable to connect to SQL Server session
database.
---System.InvalidO perationExcepti on: 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."

Thanks in advance!

Oct 6 '06 #2
Maybe, when for the state management is used a connection pool, the
connection is not immediately released to the pool by the system:
is there a problem when a connection pool is defined in the string
"sqlConnectionS tring" of the "sessionSta te" section of Web.config?

For the connections to the application DB we are using a different DB and a
different connection string. So I think that the our application is using
another connection pool, because every different connection string defines a
different connection pool.

For the application connection to Sql Server we have checked that every time
the connection is correctly opend, closed, disposed by the application code.
But for the session management we can't control when the connection is
released to the pool, because this is automatically done by the system when
the session data are read and written to Sql Server: maybe in these cases is
there a delay in the release of the connection to the pool?
Thanks!
Joe

--
"Baski" wrote:
We had the same issue , we increased the max to 999 , then we stop getting
htis error.

"JoeSep" <Jo****@discuss ions.microsoft. comwrote in message
news:27******** *************** ***********@mic rosoft.com...
Hi!
Is it correct/safe to define a connection pool in the string
"sqlConnectionS tring" of the "sessionSta te" section of Web.config?
- The application is developed using AspNet 1.1 in a Windows Server 2003.
- The AspState DB is defined in a Sql Server 2000 DB on another server.

I have added this definition to the Web.config file:

<sessionState
mode="SQLServer "
sqlConnectionSt ring="data source=xxx.xxx. xxx;user
id=xxx;password =xxx;connection reset = true;connection lifetime =
15;enlist=true; min pool size=1;max pool size=200;"
cookieless="fal se"
timeout="2" />

but, when many users are using the application, sometimes I get this
error:
"System.Web.Htt pException: Unable to connect to SQL Server session
database.
---System.InvalidO perationExcepti on: 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."

Thanks in advance!


Oct 9 '06 #3

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

Similar topics

3
3218
by: Derek Fountain | last post by:
For a low-ish traffic website that is doing the simple "build pages from HTML templates and info in a database" kind of thing, do the wise folks in this newsgroup advocate connecting and disconnecting from the DB with each query, or maintaining a persistent connection in the session? I guess my application could work either way, and I've gravitated towards the connect-query-disconnect method, but not for any really good reason. It struck...
11
2883
by: Bob | last post by:
In our new .NET web applications, we try to limit the use of SqlConnection to just one instance per page, even if there are multiple accesses to various queries. The thinking behind is that this reduces the need to getting and returning connections to the pool repeatedly if a page has multiple calls to the DB, and each one manages its own connection. However, this does requires more deliberate coding, like calling the...
2
2446
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 open, because I begin to receive error message indicating that the system can not open a connection and I should check my connection pool, with me being the only one on the server, this should not really be a problem. I am not sure why I do not...
5
1489
by: Adam Getchell | last post by:
Hello all, I've read over: http://idunno.org/dotNet/trustedConnections.aspx I would like to use a trusted connection vice using encrypted database strings: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT11.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT11.asp
18
3223
by: Rob Nicholson | last post by:
We're getting an occasional occurrence of the following error when two users try and open the same record in our ASP.NET app: "There is already an open DataReader associated with this Connection which must be closed first." As suggested, I was closing the connection in the Finally part of the outer Try but I wasn't closing the data reader as well so I assume that if the following happens, the above error could occur
8
7849
by: Ike | last post by:
Is anyone aware of a means of connection pooling (to MySQL, say) in php? Thanks, Ike
4
2151
by: Alex | last post by:
Hello, This is a follow-up to my earlier post about having issues with our application pool recycling. We currently use Session State InProc, but if I were to choose to move the existing application to SQL instead, would the only change in the application be the SessionState setting within web.config? I know I'd also need to setup our MS SQL database to handle sessions (detailed in MS Article 317604), but outside of this, is there...
6
4024
by: TheSteph | last post by:
Hi, (using C#, VS2005, .NET 2.0.) I sometimes need to access my database (SQL Server) in SINGLE_USER mode.
0
7969
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
7886
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
8272
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8381
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...
0
8258
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
5847
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
5431
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
3886
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...
1
2404
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 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.