1
當IIS應用程序池回收時,將重建所有ServiceStack SSE連接。如果有很多連接,比如說2000甚至更多,那麼服務器端會拋出很多異常。它說連接被遠程主機(客戶端)關閉。我想知道爲什麼會發生這種情況。IIS應用程序池回收時的ServiceStack SSE連接
這裏是例外的servicestack日誌樣本
2017-05-24 15:22:12,131: ERROR 14 EventSubscription - Error publishing notification to:
System.Web.HttpException (0x800704CD): The remote host closed the connection. The error code is 0x800704CD.
at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()
at System.Web.HttpResponse.Flush(Boolean finalFlush, Boolean async)
at System.Web.HttpResponse.Flush()
at System.Web.HttpWriter.WriteFromStream(Byte[] data, Int32 offset, Int32 size)
at System.Web.HttpResponseStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at ServiceStack.StreamExt.Write(Stream stream, String text)
at ServiceStack.ServerEventsFeature.<>c.<.ctor>b__76_0(IResponse res, String frame)
at ServiceStack.EventSubscription.PublishRaw(String frame)
只是不明白爲什麼它會發送「\ n」即使它已過期? – Hong
@Hong可能是在AppHost/ServerEvents處置後嘗試將通知發佈到訂閱的結果。我已將它更改爲在[this commit]([提交])(https://github.com/ServiceStack/ServiceStack/commit/2b60599f451021c2d8cab46614e55dc6cb55ed7c)中處理後不再發布給訂閱者,此更改可從v4.5.9在MyGet上](http://docs.servicestack.net/myget)。 – mythz
在我的一臺服務器上,它總是試圖從redis獲得大量auth會話。即使我已經重新啓動應用程序池或甚至重新啓動服務器。我已經檢查過,根本沒有連接。 – Hong