SearchAsync时基础连接已关闭异常

时间:2019-03-11 23:33:11

标签: azure-search azure-search-.net-sdk

大约15秒后(从WebAPI控制器)调用 ISearchIndexClient.Documents.SearchAsync (偶尔几次)(一天几次)会抛出 HttpRequestException / WebException (一天几次)从发出呼叫。几乎在同一时间进行的大多数搜索都没有问题。引发相同的搜索将花费约80毫秒再次成功。

我们使用 SearchIndexClient 的单例实例,控制器在多个请求中调用该实例。

其他信息:

  • 单个索引(约1700万个文档,约60GB),3个副本和12个分区
  • SDK版本5.0.0.0
  • 查询仅使用过滤器(eq,search.ismatch,search.in)
  • 典型负载:
      每分钟
    • 500-1300次搜索
    • 每分钟2000-3000次upserts

这是一个已知问题吗?任何解决方法?

这是调用堆栈:

    Error: System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server. ---> System.IO.IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
       at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
       at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
       --- End of inner exception stack trace ---
       at System.Net.Security._SslStream.EndRead(IAsyncResult asyncResult)
       at System.Net.TlsStream.EndRead(IAsyncResult asyncResult)
       at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
       --- End of inner exception stack trace ---
       at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
       at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
       --- End of inner exception stack trace ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.Rest.RetryDelegatingHandler.<>c__DisplayClass11_0.<<SendAsync>b__1>d.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.Rest.RetryDelegatingHandler.<SendAsync>d__11.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.Azure.Search.DocumentsOperations.<DoContinueSearchWithHttpMessagesAsync>d__21`3.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.Azure.Search.DocumentsOperationsExtensions.<SearchAsync>d__17`1.MoveNext()

0 个答案:

没有答案