ServiceBusTrigger continously logs warnings about "The operation did not complete within the allocated time 00:01:00 for object receiverNNN"
See original GitHub issueWe have a Function App running in Azure, with a ServiceBusTrigger configured. And while it is running, twice every minute, it will log a warning for:
RunOperation encountered an exception and will retry. Exception: Azure.Messaging.ServiceBus.ServiceBusException: The operation did not complete within the allocated time 00:01:00 for object receiver596. (ServiceTimeout)
---> System.TimeoutException: The operation did not complete within the allocated time 00:01:00 for object receiver596.
at Microsoft.Azure.Amqp.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.Azure.Amqp.AmqpObject.OpenAsyncResult.End(IAsyncResult result)
at Microsoft.Azure.Amqp.AmqpObject.EndOpen(IAsyncResult result)
at Microsoft.Azure.Amqp.AmqpObject.<>c.<OpenAsync>b__51_1(IAsyncResult r)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location ---
at Azure.Messaging.ServiceBus.Amqp.AmqpConnectionScope.OpenAmqpObjectAsync(AmqpObject target, TimeSpan timeout, CancellationToken cancellationToken, String entityPath)
at Azure.Messaging.ServiceBus.Amqp.AmqpConnectionScope.OpenReceiverLinkAsync(String identifier, String entityPath, TimeSpan timeout, UInt32 prefetchCount, ServiceBusReceiveMode receiveMode, String sessionId, Boolean isSessionReceiver, CancellationToken cancellationToken)
at Azure.Messaging.ServiceBus.Amqp.AmqpReceiver.OpenReceiverLinkAsync(TimeSpan timeout, UInt32 prefetchCount, ServiceBusReceiveMode receiveMode, String identifier, CancellationToken cancellationToken)
at Microsoft.Azure.Amqp.FaultTolerantAmqpObject`1.OnCreateAsync(TimeSpan timeout)
at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
at Azure.Messaging.ServiceBus.Amqp.AmqpReceiver.<>c.<<OpenLinkAsync>b__72_0>d.MoveNext()
--- End of stack trace from previous location ---
at Azure.Messaging.ServiceBus.ServiceBusRetryPolicy.RunOperation[T1,TResult](Func`4 operation, T1 t1, TransportConnectionScope scope, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
Category: Azure.Messaging.ServiceBus LogLevel: Warning EventName: RunOperationExceptionEncountered
I spent about 1 working-day troubleshooting this, until I realized it is actually fully functional, and I guess the behavior is part of the intented implementation. BUT logging this with loglevel warning should not be done then.
Nuget packages: Microsoft.Azure.WebJobs.Extensions.ServiceBus, 5.2.0 Microsoft.NET.Sdk.Functions, 4.0.1
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:21 (7 by maintainers)
Top Results From Across the Web
The operation did not complete within the allocated time 00 ...
Hi, I am encountering the below error randomly. The operation did not complete within the allocated time 00:01:00 for object session140.
Read more >Azure Function using ServiceBusTrigger doesn't work in ...
Instead, I only observe the following error: System.TimeoutException: 'The operation did not complete within the allocated time 00:00:49.9480520 ...
Read more >Azure Service Bus trigger for Azure Functions
Use the Service Bus trigger to respond to messages from a Service Bus queue or topic. Starting with extension version 3.1.0, you can...
Read more >azure function not able to recieve message from servicebus
I have created Azure function in MS Visual Studio which listens for events from servicebus topic. When I published to Azure Function app....
Read more >'Azure.Messaging.ServiceBus.ServiceBusExceptio' when ...
Azure.Messaging.ServiceBus.ServiceBusException: The operation did not complete within the allocated time 00:00:30 for object [REMOVED].windows.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I would agree that for this specific retriable error, logging as verbose would be sufficient. In general, I think retries for exceptions that are not expected during the normal application flow should be Informational. I will take a look and see what we can do to improve this.
@JoshLove-msft I totally agree that these messages should be at the Debug level. I don’t want to have to filter out this namespace specifically at the Informational level as there may be other messages that I do want to log. As no action can be performed by the developer to change whether or not these messages would appear, I see them as diagnostic and part of normal correct operation rather than something which should be logged with such frequency.