question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Queue trigger timeout exception cause host restart

See original GitHub issue

Similar to https://github.com/Azure/azure-webjobs-sdk/issues/2476, we notice the host is keeping restarting with queue connection issue:

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 52.241.88.73:443

at Microsoft.Azure.Storage.Core.Executor.Executor.<ExecuteAsync>d__11.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.WebJobs.Extensions.Storage.TimeoutHandler.<ExecuteWithTimeout>d__11.MoveNext() in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Extensions.Storage\TimeoutHandler.cs:line 56 — 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.WebJobs.Host.Queues.Listeners.QueueListener.<ExecuteAsync>d__33.MoveNext() in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Extensions.Storage\Queues\Listeners\QueueListener.cs:line 235 — 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.WebJobs.Host.Timers.TaskSeriesTimer.<RunAsync>d__14.MoveNext() in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Timers\TaskSeriesTimer.cs:line 147 — End of stack trace from previous location where exception was thrown — at Microsoft.Azure.WebJobs.Host.Timers.WebJobsExceptionHandler.<>c__DisplayClass3_0.<OnUnhandledExceptionAsync>b__0() in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Timers\WebJobsExceptionHandler.cs:line 54 at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()

Repro steps

Provide the steps required to reproduce the problem None, these errors occur in production env and it is transient. But it had a bad impact.

Expected behavior

The queue connection exception should result to a retry instead of restarting of the host

Actual behavior

web job host keeps restarting

Known workarounds

None

Related information

simular to: https://github.com/Azure/azure-webjobs-sdk/issues/2476

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
DingmaomaoBJTUcommented, Oct 13, 2021

The function app name: BotManagementJob

The function name: BotStateCleanupFunction

Region: Brazil South

Timestamp: 2021-09-22 05:42:42.6912954

0reactions
v-anvaricommented, Nov 8, 2021

Closing this issue here as an incident has been submitted to work on the issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Improve Queue Trigger\Storage binding to be more ...
The Queue Trigger may timeout after two minutes and this causes a restart of the Host. E.G System.TimeoutException : The operation ...
Read more >
Azure Function triggered by Service Bus Queue event ...
Every message failed with "Microsoft.Azure.WebJobs.Host.FunctionTimeoutException". The message is "Timeout value of 00:05:00 was exceeded by the ...
Read more >
Why Azure QueueTriggered function app throwing Timeout ...
I have deployed a QueueTriggered function app on to Azure portal. But it seems like sometimes throwing Timeout exceeded exception.
Read more >
Azure Function and .NET 5: How to retry with Queue Trigger
1. Open host.json and update as below. · 2. Run the function again, and add new item in the queue. · 3. Then,...
Read more >
Building resilient azure functions with retry policies
A special kind of exception is timeout, which can happen on the client, server, or proxy. Client can decide to terminate waiting for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found