473,325 Members | 2,870 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

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
"sqlConnectionString" of the "sessionState" 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"
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" />

but, when many users are using the application, sometimes I get 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."

Thanks in advance!

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

"JoeSep" <Jo****@discussions.microsoft.comwrote in message
news:27**********************************@microsof t.com...
Hi!
Is it correct/safe to define a connection pool in the string
"sqlConnectionString" of the "sessionState" 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"
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" />

but, when many users are using the application, sometimes I get 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."

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
"sqlConnectionString" of the "sessionState" 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****@discussions.microsoft.comwrote in message
news:27**********************************@microsof t.com...
Hi!
Is it correct/safe to define a connection pool in the string
"sqlConnectionString" of the "sessionState" 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"
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" />

but, when many users are using the application, sometimes I get 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."

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
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...
11
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...
2
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...
5
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:...
18
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...
8
by: Ike | last post by:
Is anyone aware of a means of connection pooling (to MySQL, say) in php? Thanks, Ike
4
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...
6
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
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.