Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 Pooling Exceeded Connections Website

Author  Topic 

conedm
Starting Member

33 Posts

Posted - 2011-12-08 : 13:47:46
I am having problems with pooling on my website.
SQL Server 2008 R2
My connections are all set in USING statements to make sure they are closing/disposing. and I have tried numerous arguments in the connection string.
The site bombs constantly. I have approximately 40 people attempting to connect.
My latest connection string is as follows:

Server=xxx.xx.xx.xx;DataBase=WEBCONTRACTS;UID=xxxxxxx;PWD=xxxxxx;Min Pool Size=5;Max Pool Size=60;Connect Timeout=2

Everyone uses the same connection string.
Can someone tell me what I might have wrong?
Or whatever other info you may need?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-12-08 : 15:37:24
Please explain "the site bombs constantly". We need more info about what issue you are having.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

conedm
Starting Member

33 Posts

Posted - 2011-12-08 : 16:23:11
When I execute a exec sp_who on the database that is accessed by my webpage, there is a lot of web connections that do not close. Once the count (spid) column gets to 157 (screenshot attached)

the website fails and the users get the following error:
"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. "


"[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.]
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +6275569
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +6275911
System.Data.SqlClient.SqlConnection.Open() +258
CAT_Scale.PurchaseOrder.PurchaseOrder_Load(Object sender, EventArgs e) in C:\Documents and Settings\jon\My Documents\Dot Net\Projects\CAT Scale\CAT Scale\PurchaseOrder.aspx.vb:13
System.Web.UI.Control.OnLoad(EventArgs e) +132
System.Web.UI.Control.LoadRecursive() +66
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428
"
Go to Top of Page

conedm
Starting Member

33 Posts

Posted - 2011-12-08 : 16:34:14
I should probably add that we replaced our old web server that had SQL Server 2005 and it worked fine on that one for years. This new server with SQL Server 2008 R2 is causing this issue
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-12-08 : 16:49:39
If it's truly a problem with your connection pool, you'll likely want to post your question on a programming site like www.asp.net. Are you sure that those other connections are all stale though? And why do you have such a low limit on the pool size? We've got a system where we allow up to 2000 connections in the pool. It only gets up to 500, but our hardware can support more so we set a high limit.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

conedm
Starting Member

33 Posts

Posted - 2011-12-08 : 17:03:04
I tried a higher max but it doesn't matter what I put it fails at spid 157
Go to Top of Page
   

- Advertisement -