"Operation was cancelled" 长时间抛出异常 运行 Azure 索引器
"Operation was cancelled" exception is throwing for long running Azure indexer
我们收到 "Operation was cancelled" 异常,而 Azure Indexer 对于较大的记录(大约 2M+)是 运行。这是日志详细信息 -
"The operation was canceled. Unable to read data from the transport connection: The I/O operation has been aborted because of either a thread exit or an application request. The I/O operation has been aborted because of either a thread exit or an application request "
我们是运行线程下的索引器。它适用于较小的记录,但对于较大的记录 (1M+),它会抛出套接字异常。
有人在 运行 Azure Indexer for large records(运行 for long time)时看到这个错误吗?
(我们已经将 httpclient 超时增加到 serviceClient 对象的最大值。)
这可能是因为 HTTP 连接过多。尝试让你的 **HttpClient**
静态,看看是否有任何改进。 **HttpClient**
使用最大记录执行需要超时到最大值。
您可能还想考虑努力减少 sql 查询时间以获得最佳索引器性能。如果可能,请分享您的代码。
希望对您有所帮助。
尝试将 SearchServiceClient.HttpClient.Timeout
设置为 Timeout.InfiniteTimeSpan
。在向 Azure 认知搜索发送任何请求之前,您必须设置超时。
client.HttpClient.Timeout = Timeout.InfiniteTimeSpan;
我们收到 "Operation was cancelled" 异常,而 Azure Indexer 对于较大的记录(大约 2M+)是 运行。这是日志详细信息 -
"The operation was canceled. Unable to read data from the transport connection: The I/O operation has been aborted because of either a thread exit or an application request. The I/O operation has been aborted because of either a thread exit or an application request "
我们是运行线程下的索引器。它适用于较小的记录,但对于较大的记录 (1M+),它会抛出套接字异常。
有人在 运行 Azure Indexer for large records(运行 for long time)时看到这个错误吗?
(我们已经将 httpclient 超时增加到 serviceClient 对象的最大值。)
这可能是因为 HTTP 连接过多。尝试让你的 **HttpClient**
静态,看看是否有任何改进。 **HttpClient**
使用最大记录执行需要超时到最大值。
您可能还想考虑努力减少 sql 查询时间以获得最佳索引器性能。如果可能,请分享您的代码。
希望对您有所帮助。
尝试将 SearchServiceClient.HttpClient.Timeout
设置为 Timeout.InfiniteTimeSpan
。在向 Azure 认知搜索发送任何请求之前,您必须设置超时。
client.HttpClient.Timeout = Timeout.InfiniteTimeSpan;