473,789 Members | 2,624 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with ASP.NET Session in SQL Server and Connection Pooling

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

Is it safe/recommended to set a connetion pool in the Session
connection string in Web.config?
Actually I have put this definition in the Web.config:

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

Thanks in advance!
Ryo

Oct 5 '06 #1
2 5126
the error means close is not being called on the connection. be sure you
have no code that uses the same connection string. also check that you have
no trouble connecting to dc for authenication.

-- bruce (sqlwork.com)
"RyoSaeba" <ry******@mail2 Air.comwrote in message
news:11******** **************@ h48g2000cwc.goo glegroups.com.. .
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.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."

Is it safe/recommended to set a connetion pool in the Session
connection string in Web.config?
Actually I have put this definition in the Web.config:

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

Thanks in advance!
Ryo

Oct 5 '06 #2
bruce barker (sqlwork.com) wrote:
the error means close is not being called on the connection. be sure you
have no code that uses the same connection string. also check that you have
no trouble connecting to dc for authenication.
Thanks for the answer!
For the other application connection to Sql Server I use a different
connection string/pool and I have checked that every time the
connection is correctly closed.
I think that this problem is only of the Connection Pool used for the
Asp.net Session management.
But is it correct to define a connection pool in the string
"sqlConnectionS tring" of the "sessionSta te" section of Web.config? Or
for the sessionState is better don't define a connection pool in the
connection string?
Thanks.
Ryo
>
"RyoSaeba" <ry******@mail2 Air.comwrote in message
news:11******** **************@ h48g2000cwc.goo glegroups.com.. .
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.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."

Is it safe/recommended to set a connetion pool in the Session
connection string in Web.config?
Actually I have put this definition in the Web.config:

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

Thanks in advance!
Ryo
Oct 6 '06 #3

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

Similar topics

0
2026
by: Refky Wahib | last post by:
Hi I need Technical Support I finished a Great project using .Net and SQL Server and .Net Mobile Control My Business case is to implement this Program to accept about 1 Million concurrent users So I designed the project as master Node that has all administration
8
1309
by: James | last post by:
I've been having this recurring General Network Error problem and I've been looking to solve it. Reboot fixes the problem for several hours, but eventually it happens again. Nothing seems to specifically trigger it. HTML loads fine, ASP pages that connect to SQL Server, no dice. Long story short, it happened about 15 minutes ago and one of the pages that connects to SQL Server worked, but none of the other ones would. The page in...
14
2603
by: mjkahn | last post by:
I've read (and read!) that you shouldn't store objects in Session variables. I've read these reasons: - The object takes up memory that may not be freed until the session times out. Better to create the object only when you actually use it. - Causes poor performance because the thread that created the object has to service all requests for it. Assuming I can live with the memory and performance implications (a big if,
4
1566
by: Reinier Beeckman | last post by:
Hi got the following problem, it's more a programming problem then really a database problem. I have a Database class which connects to a mySQL database on the network. In WebForm1.aspx i connect, using the Database class, to this database. Works fine. In Webform1.aspx i have the main view (SELECT * FROM) of the database. In Webform2.aspx i want to see certain details. So when i click on a button in Webform1.aspx i go to Webform2.aspx. ...
6
2388
by: Gonenc Ercan | last post by:
Hi, I ve ended up debugging a ASP.NET project (with about 380 files on the project .NET Framework 1.0 on IIS 5.0) which has a memory leak... The memory rises too fast. With about 25-30 active sessions (average) the memory rises about 300 MB's in an hour. I've checked the database (SQL Server 2000) and seen that there are lots of sleeping connections. (about 400!!!) I thought somewhere in the code they left the connection open, so decided...
1
1841
by: Refky Wahib | last post by:
Hi Actually I need Technical Support I finished a Great project using .Net and SQL Server and .Net Mobile Control My Business case is to implement this Program to accept about 1 Million concurrent users So I designed the project as master Node that has all administration project and about 10 client Nodes Those subscribers will login and I configured the replication at Server that can publish any change to the Nodes
14
4826
by: Nick Gilbert | last post by:
Hi, I have an asp.net application which runs from a CD-ROM using Cassini. As such, it is single user only. The application connects to an Access database when it is loaded, and keeps the same connection open all the time (as it's single user, this shouldn't be a problem). There is logic in the code to ensure that the connection is
5
3399
by: Usman Jamil | last post by:
Hi I've a class that creates a connection to a database, gets and loop on a dataset given a query and then close the connection. When I use netstat viewer to see if there is any connection open left, I always see that there are 2 connections open and in "ESTABLISHED" state. Here is the piece of code that I'm using, please tell where I'm doing it wrong. Since this class is being used at many placed in my actual web based application that...
10
9222
by: shubha.sunkada | last post by:
Hi, I have a recordset connection in asp that I am using to search records.If I use the client side cursorlocation (rs.cursorlocation=3) then it takes really long to return back the records due to which a timeout occurs.If I change the cursorlocation to adUseNone(1) or adUseServer(2) then the search is faster and without any problems.But the sort on records cannot be done if I use adUseClient(3).I need to have sort on these records.
0
9511
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
10408
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
9983
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...
0
9020
agi2029
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...
1
7529
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
6769
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
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4092
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
3
2909
bsmnconsultancy
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...

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.