July 29, 2008 at 8:31 am
Hi guys,
I have an SQL2K5 SP1 over W2K3 operating as session server for 6 IIS servers.
Sometimes we are having the following errors...
System.Web.HttpException: Unable to connect to SQL Server session database.
---> System.Data.SqlClient.SqlException: A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
and
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.
We have set the max pool size as 500 and the min pool size as 2 for each IIS, verify and repair all network problem, we don't have an firewall between the servers.
But times for times, and at determinated hour (when we have a lot of entries) we receive lots of errors like this (about 100 to 200 per second).
Yes you can think that’s probably an error about to much connections at the same time, but this errors continue along the day coming about 3 to 30 errors per second.
I put the compete errors at botton of this post..
Tanks
Leonardo
ERROR 1
System.Web.HttpException: Unable to connect to SQL Server session database.
---> System.Data.SqlClient.SqlException: A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParserStateObject.WriteSni()
at System.Data.SqlClient.TdsParserStateObject.WritePacket(Byte flushMode)
at System.Data.SqlClient.TdsParserStateObject.ExecuteFlush()
at System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC[] rpcArray, Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehaviorcmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehaviorcmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehaviorcmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader()
at System.Web.SessionState.SqlSessionStateStore.DoGet(HttpContextcontext, String id, Boolean getExclusive, Boolean& locked, TimeSpan&lockAge, Object& lockId, SessionStateActions& actionFlags)
--- End of inner exception stack trace ---
at
System.Web.SessionState.SqlSessionStateStore.ThrowSqlConnectionException(Sql
Connection conn, Exception e)
at System.Web.SessionState.SqlSessionStateStore.DoGet(HttpContextcontext, String id, Boolean getExclusive, Boolean& locked, TimeSpan&lockAge, Object& lockId, SessionStateActions& actionFlags)
at
System.Web.SessionState.SqlSessionStateStore.GetItemExclusive(HttpContextcontext, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actionFlags)
at System.Web.SessionState.SessionStateModule.GetSessionStateItem()
at System.Web.SessionState.SessionStateModule.BeginAcquireState(Objectsource, 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)
System.Data.SqlClient.SqlException: A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 -An existing connection was forcibly closed by the remote host.)
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlExceptionexception, Boolean breakConnection)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParserStateObject.WriteSni()
at System.Data.SqlClient.TdsParserStateObject.WritePacket(Byte flushMode)
at System.Data.SqlClient.TdsParserStateObject.ExecuteFlush()
at System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC[] rpcArray,
Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehaviorcmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehaviorcmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehaviorcmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehaviorbehavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader()
at System.Web.SessionState.SqlSessionStateStore.DoGet(HttpContextcontext, String id, Boolean getExclusive, Boolean& locked, TimeSpan&lockAge, Object& lockId, SessionStateActions& actionFlags)
ERROR 2
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.
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Web.SessionState.SqlSessionStateStore.SqlStateConnection..ctor(SqlPartitionInfo sqlPartitionInfo)
--- End of inner exception stack trace ---
at System.Web.SessionState.SqlSessionStateStore.ThrowSqlConnectionException(SqlConnection conn, Exception e)
at System.Web.SessionState.SqlSessionStateStore.SqlStateConnection..ctor(SqlPartitionInfo sqlPartitionInfo)
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)
==============================================================
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.
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Web.SessionState.SqlSessionStateStore.SqlStateConnection..ctor(SqlPartitionInfo sqlPartitionInfo)
July 31, 2008 at 7:51 am
Nothing??? :crying:
i am screwed :blink:
July 31, 2008 at 8:04 am
is there a reason you can't upgrade to SQL2005 SP2? we had this problem and upgrading helped, but it didn't fix it completely.
July 31, 2008 at 8:19 am
Lenny i have to see this with my IT Manager, but we solve a litle this problem taking off the pooling from SQL session..
Some other apear but we dont receive 300 erros per second anymore... instead of it now we receive 1 or 2 per 15 minutes or more =)
If i resolve the problems or make the the state becomes better i will post here .
thhx
July 31, 2008 at 8:22 am
could you post the details of your fix here? i'm sure others will come across this and would really appreciate being able to repeat the fix themselves.
thanks,
lenny
July 31, 2008 at 8:54 am
Well,
- We found an error at our cables (fixed)
- Found that our port at switch (10/100) was having 100% of usage (changed for an gigabit port)
- Discoverd that when you have an bad connection at the sql session the sql server flush the entire pool. (set pooling = no)
Having solved the problem with the cables and changed the switch port to an gigabit port, some problems were already solved. But we were having the problems yet. Then we set pooling = no.
Doing this our errors like the ones i posted at the beggining passed about 300 per second to 1 or 2 per 15 mimnutes or more time.
We are having the issues yet but now its an simple error and not an major error =)
I think thats it, we are having new problems now but aren´t emergency cases.
thx for all
November 24, 2008 at 12:57 am
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy