August 27, 2008 at 6:15 pm
Hello All,
I'm a new server admin who inherited an asp.net site with a sql server 2005 database behind it. I'm going through making some .css changes to the site to adjust things, but eventually I ran into the problem of the server timing out due to too many connections open. The sql server is still at the 100 connections. I've been reading other people's responses to this all over the web but haven't been able to fix my issue yet:(
I've gone through all the code of the site to make sure that all the .Open()'s have associated .Close()'s and they all have them in what seems like a clean format (often in a try/finally format). The code is already running on a live server with no trouble, but on this dev server it's not co-operating. And to create 2 more connections, all I have to do is refresh a page on the dev site. Until the connections are maxed out however, the site works like a charm.
Here is the Error Text:
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.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: 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.
Source Error:
Line 118: "WHERE Content.ContentId = " & id.ToString
Line 119: cm = New SqlCommand(qry, cn)
Line 120: cn.Open()
Line 121: Dim dr As SqlDataReader = cm.ExecuteReader()
Line 122: If dr.Read Then
And here is part of my web.config file that declares the connection string for the site:
(imagine appropriate greater than/less than signs)
connectionStrings
remove name="LocalSqlServer"/
add name="LocalSqlServer" connectionString="Server=AMP01\BKUPEXEC;Database=arvid;User Id=arvd; Password=---;"/
/connectionStrings
Can anyone help me figure out what the heck is going on? In the mean time, I'm able to restart the dev site IIS to clear the connections and start working, but I'm afraid for when we go live. (The live site that is currently going fine was a separate implementation for a different company).
Thanks!
August 28, 2008 at 12:49 am
Hi
Saw this error message a while ago - the problem was not with the connections but with a query, which did not finish. The stuff about the connections in the error message was a red herring.
Can you increase the timeout value in your front-end code? I sort of remember a default of 30 seconds (can't remember where I set it!). If this is what I had, increasing the timeout worked.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply