2017-05-26 12 views
1

IISアプリケーションプールがリサイクルすると、すべてのServiceStack SSE接続が再構築されます。 2000以上の接続が多い場合は、サーバー側で多くの例外がスローされます。 リモートホスト(クライアント)によって接続が閉じられていると表示されます。なぜこれが起こっているのだろうかと思います。ここでIISアプリケーションプールのリサイクル中のServiceStack SSE接続

はServiceStackはもはやServer Eventsを公開するために使用しないことを長時間実行HTTP接続が応答ストリームにそう書いて存在するため、例外はある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) 

答えて

0

あるという例外がスローされます。

この場合、ServiceStack logs the error you see aboveが発生し、自動的にunsubscribes the Event subscriptionになります。

+0

「\ n」が期限切れになってもなぜ送信するのか分かりません。 – Hong

+0

@Hongは、AppHost/ServerEventsが破棄された後に、サブスクリプションへの通知を公開しようとしている可能性があります。私はそれが[このコミット](https://github.com/ServiceStack/ServiceStack/commit/2b60599f451021c2d8cab46614e55dc6cb55ed7c)に置かれた後もサブスクライバに公開されなくなるように変更しました。この変更はv4.5.9から利用可能になりました。 on MyGet](http://docs.servicestack.net/myget)を参照してください。 – mythz

+0

私のサーバーの1つでは、常にレディから多くの認証セッションを取得しようとしています。アプリケーションプールを再起動したり、サーバーを再起動したりしています。私は接続が全くないことを確認しました。 – Hong

関連する問題