我想知道是否有人可以帮助我对我们遇到的可能与服务堆栈服务器端事件链接的IIS崩溃问题有一些见解/想法?
我们的应用程序在IIS7中托管的Web应用程序中使用ServiceStack。 Web应用程序利用ServiceStack服务器端事件功能向客户端(Internet Explorer浏览器应用程序)发送一些小而时间敏感的数据。对于客户端,我们使用polyfill(Yaffle事件源)和ss-utils.js来管理SSE订阅,取消订阅,心跳,数据接收等。
事情运行良好,但最近我们遇到了一个完整的崩溃或损坏的IIS AppPool托管Web应用程序与ServiceStack&服务器端事件。最近,我们关闭了IIS AppPool Recycling,我们相信这暴露了这个问题。但是,我们不知道根本原因是什么。
崩溃/损坏后,我们在IIS错误日志中看到了这一点:
A worker process '44588' serving application pool '[AppPool]' failed to stop a listener channel for protocol 'http' in the allotted time. The data field contains the error number.
我研究并知道上述错误表明AppPool遇到了一些错误状态,并且定期AppPool回收应该保持其正常运行;然而,这并不理想,也无法解决根本问题。
在上述IIS错误发生前几分钟,此ServiceStack相关错误出现在同一日志中:
Event code: 3005 Event message: An unhandled exception has occurred. Event ID: fc5b1e959d8343c7acb9b066dff6a927 Event sequence: 10 Event occurrence: 1 Event detail code: 0 Process information: Process ID: 44588 Process name: w3wp.exe Exception information: Exception type: NullReferenceException Exception message: Object reference not set to an instance of an object. at ServiceStack.ServerEventsFeature.CanAccessSubscription(IRequest req, String subscriptionId) at ServiceStack.ServerEventsHeartbeatHandler.ProcessRequestAsync(IRequest req, IResponse res, String operationName) at ServiceStack.Host.Handlers.HttpAsyncTaskHandler.ProcessRequestAsync(HttpContextBase context) at ServiceStack.Host.Handlers.HttpAsyncTaskHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) Request information: Request URL: http://---/---/---/event-heartbeat?id=9GZtp60kxKYpV6n7Mtdq Request path: /---/api/event-heartbeat Thread information: Thread ID: 17 Is impersonating: False Stack trace: at ServiceStack.ServerEventsFeature.CanAccessSubscription(IRequest req, String subscriptionId) at ServiceStack.ServerEventsHeartbeatHandler.ProcessRequestAsync(IRequest req, IResponse res, String operationName) at ServiceStack.Host.Handlers.HttpAsyncTaskHandler.ProcessRequestAsync(HttpContextBase context) at ServiceStack.Host.Handlers.HttpAsyncTaskHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
鉴于上述情况,我想知道ServiceStack错误是否是: 1)IIS AppPool崩溃的原因? 要么 2)由IIS AppPool崩溃引起的?
我们确实遇到了很多“软错误”,涉及客户端取消订阅服务器端事件(这是由于客户端 - 服务器调用的时间以及我们为解决其他问题而运行的一些清理代码) 。我认为这些“软错误”不会导致真正/重大问题+真的“软”,因为它们可以被安全地忽略吗?
任何有关此事的帮助都将不胜感激。
谢谢!