473,498 Members | 1,815 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.HttpException: Unable to connect to SQL Server session
database. ---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."

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"
sqlConnectionString="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="false"
timeout="2" />

Thanks in advance!
Ryo

Oct 5 '06 #1
2 5070
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******@mail2Air.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.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.HttpException: Unable to connect to SQL Server session
database. ---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."

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"
sqlConnectionString="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="false"
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
"sqlConnectionString" of the "sessionState" section of Web.config? Or
for the sessionState is better don't define a connection pool in the
connection string?
Thanks.
Ryo
>
"RyoSaeba" <ry******@mail2Air.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.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.HttpException: Unable to connect to SQL Server session
database. ---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."

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"
sqlConnectionString="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="false"
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
2009
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...
8
1284
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...
14
2581
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...
4
1551
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,...
6
2370
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...
1
1815
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...
14
4777
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...
5
3364
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...
10
9195
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...
0
7126
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,...
0
7005
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...
0
7168
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,...
0
7210
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...
1
6891
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...
0
5465
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,...
1
4916
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...
0
3096
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...
1
659
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.