469,621 Members | 1,821 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,621 developers. It's quick & easy.

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 4714
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by James | last post: by
4 posts views Thread by Reinier Beeckman | last post: by
6 posts views Thread by Gonenc Ercan | last post: by
1 post views Thread by Refky Wahib | last post: by
5 posts views Thread by Usman Jamil | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.