Azure Search Failing With TaskAwaiter.ThrowForNonSuccess(Task task

Van Roekel, Bob 1 Reputation point
2021-04-02T13:03:21.017+00:00

Yesterday we started having Search failures periodically throughout the day (01-APR-2021) from our MVC webapp(Azure Web App) here is the stacktrace:

Data:
at Microsoft.Rest.RetryDelegatingHandler.d__15.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.Http.HttpClient.d__58.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Microsoft.Azure.Search.DocumentsOperations.d__213.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Search.DocumentsOperationsExtensions.d__171.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at iVH.DERISK.Infrastructure.BoundedContext.UnitOfWork.SearchAzure.d__14.MoveNext() in D:\a\1\s\iVH.SRA\iVH.DERISK.Infrastruture\BoundedContext\UnitOfWork\Search\SearchAzure.cs:line 271 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at iVH.DERISK.Infrastructure.BoundedContext.UnitOfWork.SearchAzure.d__11.MoveNext() in D:\a\1\s\iVH.SRA\iVH.DERISK.Infrastruture\BoundedContext\UnitOfWork\Search\SearchAzure.cs:line 84 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at iVH.DERISK.Infrastructure.BoundedContext.Repositories.SearchFacade.d__2.MoveNext() in D:\a\1\s\iVH.SRA\iVH.DERISK.Infrastruture\BoundedContext\Repositories\Search\SearchFacade.cs:line 23 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at iVH.DERISK.Application.BoundedContext.SearchService.d__2.MoveNext() in D:\a\1\s\iVH.SRA\iVH.DERISK.Application\BoundedContext\Search\SearchService.cs:line 28 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at iVH.SRA.Web.Controllers.SearchController.d__4.MoveNext() in D:\a\1\s\iVH.SRA\iVH.SRA.Web\Controllers\SearchController.cs:line 89

I tried it several times today and cant replicate so just wondering if there were issues yesterday in search?

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
694 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 15,441 Reputation points
    2021-04-12T21:39:11.54+00:00

    Hi @Van Roekel, Bob ,

    We apologize for the delay in response. sometimes this error can be caused due to the service being pushed above its limit and may not be able to keep up with the request rate. You can view this similar SO thread.

    Here is a possible solution that was posted:

    " Issue could be due to starvation of TCP connection pool and adding the connection settings showed improvements. To resolve other exceptions while calling Search service (Task cancelled exceptions, Http Socket exceptions, IndexBatch exceptions, Null reference exceptions, Service too busy exceptions etc), additional modifications/fix were made as per the requirement:

    -Increase the service replicas.
    -Decrease load on Search service by reducing calls.
    -Adding delays. "

    0 comments No comments