无法向会话状态服务器发出会话状态请求

现在大约4-5个月,我似乎有这个零星的问题 – 主要是在我们最忙碌的时间之间10:30-11:45上午,我所有的Windows 2003 Web服务器在Microsoft NLB群集开始投掷会话状态服务器错误。 示例错误如下。

System.Web.HttpException: Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the client and server ports are the same. If the server is on a remote machine, please ensure that it accepts remote requests by checking the value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection. If the server is on the local machine, and if the before mentioned registry value does not exist or is set to 0, then the state server connection string must use either 'localhost' or '127.0.0.1' as the server name. at System.Web.SessionState.OutOfProcSessionStateStore.MakeRequest(StateProtocolVerb verb, String id, StateProtocolExclusive exclusiveAccess, Int32 extraFlags, Int32 timeout, Int32 lockCookie, Byte[] buf, Int32 cb, Int32 networkTimeout, SessionNDMakeRequestResults& results) at System.Web.SessionState.OutOfProcSessionStateStore.SetAndReleaseItemExclusive(HttpContext context, String id, SessionStateStoreData item, Object lockId, Boolean newItem) at System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) 

现在,我在所有服务器通信的集中式后端Windows 2003服务器上使用ASP.NET状态服务。

在我遇到这个问题之前,我最初也是在使用SQL Server状态几年。 SQL的问题是当问题发生时,它创build了阻塞情况,实质上影响了所有服务器上的所有用户。 该产品公司build议我使用标准的ASP.NET State服务,因为这是他们技术上支持的。 为什么这会使我有所作为 – 但我别无select,只能尝试一下!

我试图创build多个应用程序池,添加额外的服务器,将TCP / IP超时时间从20秒缩短到30秒,甚至调用Microsoft ASP.NET产品支持,但收效甚微。 我甚至build议他们检查他们是否使用只读会话状态而不是每个页面请求的读/写 – 据我所知,这基本上导致每个页面都进行状态服务器往返即使状态没有被使用在页面上。

不幸的是,该应用程序是由我们的产品公司开发的,他们坚持认为这是我的环境,因为其他客户没有这样的问题。 但是,我已经和其他客户谈过了,他们告诉我他们什么时候看到类似的问题,他们基本上不得不build立另一个networking农场。 这个问题几乎好像我只是在应用程序内达到了一些架构限制…

微软在这个问题上的立场是需要减less会话状态,并且从状态服务器报告返回码指示缓冲区已满。

为了更好地理解问题的范围(而不是等待客户来电和投诉),我安装了ELMAH,并将其configuration为在发生未处理的exception时向我发送电子邮件。 在高活动期间,我基本上会收到500-1000封电子邮件!

如果任何人有任何其他的想法,我可以尝试或更好的方法来解决问题,我会很感激。

当应用MS补丁KB967723时,我们开始遇到.net应用程序与远程.Net状态服务器通信的问题。 您可能会查看是否将该修补程序应用于Web服务器并尝试将其退出。

测量典型会话中应用程序存储会话状态的数据量,以及Web服务器和状态服务器之间的数据包捕获,以测量高峰使用期间的数据总量。

您可能希望增加可用的TCP端口数(默认值为5000)。 我看到了由于端口数量不足导致的类似问题(不是会话状态)。