We are getting this error abruptly in our production environment. Whenever this happens, ASP NET session Db is flooded with the timeout exceptions for a few minutes and then it comes back to normal.
Application configuration: Web form application using ASPState session Db for session management. This session management is on an exclusive DB and we are the only app using this DB. Application has a separate DB for other app schema needs (on the same sql server though).
Complete error stack:
Timestamp: 13/07/2017 04:32:35
Message: Unable to connect to SQL Server session database.
Additional Info: Requested URL[https://www.myAppURL/Services/SessionStateService.asmx/myAction], Browser[Chrome59] Inner Exception: 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. Category: Error&Warning
Priority: -1
EventId: 0 Severity: Error
Title:ERROR
Machine: myServer Application Domain: /LM/W3SVC/2/ROOT-1-131443848021611848
Process Id: 11532
Process Name: c:\windows\system32\inetsrv\w3wp.exe
Win32 Thread Id: 8236
Thread Name:
Extended Properties: Stack Trace - at System.Web.SessionState.SqlSessionStateStore.ThrowSqlConnectionException(SqlConnection conn, Exception e)
at System.Web.SessionState.SqlSessionStateStore.SqlStateConnection..ctor(SqlPartitionInfo sqlPartitionInfo, TimeSpan retryInterval) at System.Web.SessionState.SqlSessionStateStore.GetConnection(String id, Boolean& usePooling) at System.Web.SessionState.SqlSessionStateStore.DoGet(HttpContext context, String id, Boolean getExclusive, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actionFlags) at System.Web.SessionState.SqlSessionStateStore.GetItemExclusive(HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actionFlags) at System.Web.SessionState.SessionStateModule.GetSessionStateItem() at System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) Transaction Id - 9685d278-61dc-4be9-8139-e0bd4131910c