question

VanRoekelBob-6695 avatar image
0 Votes"
VanRoekelBob-6695 asked Grmacjon-MSFT answered

Azure Search Failing With TaskAwaiter.ThrowForNonSuccess(Task task

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.d58.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.d21`3.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.d17`1.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.d14.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.d11.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.d2.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.d2.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-cognitive-search
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Grmacjon-MSFT avatar image
0 Votes"
Grmacjon-MSFT answered

Hi @VanRoekelBob-6695 ,

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. "


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.