Function app does not respond to Service Bus trigger after some period of inactivity

Jose Quintero 40 Reputation points
2025-04-24T18:43:55.62+00:00

I have one Azure Function app which is not being triggered by a Service Bus message arriving at the queue. This happens after some time of inactivity and the only way to trigger the function is to log in to the Azure Portal and hit Refresh manually. There are several other functions running in the same environment but this is the only one that has this behavior. It is running in Consumption plan and I understand there is a cold start delay, however, it can be days and the function still does not respond to new messages in the queue. The only way to trigger it is to hit Refresh in the Azure Portal. The documentation does not cover this scenario so I'm trying to get support, however, there is no way to get support directly although we have a support plan with Microsoft. Any help or advice would be appreciated. Thanks.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,911 questions
{count} votes

Accepted answer
  1. Loknathsatyasaivarma Mahali 2,740 Reputation points Microsoft External Staff Moderator
    2025-04-24T21:31:33.1333333+00:00

    Hello Jose Quintero,

    Thanks for reaching out, this issue appears to be related to a known behavior with Azure Functions using Service Bus triggers on the Consumption plan, as also discussed in this Stack Overflow thread.

    When an Azure Function App is on the Consumption plan and remains idle for a period, the platform may scale down the compute resources to zero. This can cause the Service Bus listener to stop and not restart automatically when new messages arrive. That’s why the function doesn’t respond until you manually “Refresh” it in the Azure Portal—doing so forces the app to cold start and reinitializes the listener.

    While this cold start behavior is expected on the Consumption plan, the need to manually refresh suggests a deeper issue with the listener not recovering properly.

    To address this, you have a few options:

    • Upgrade to a Premium or Dedicated plan, where features like Always On and pre-warmed instances keep your app running and responsive.
    • Add a timer-triggered "keep-alive" function that runs every few minutes to prevent the app from going idle.
    • Check your Service Bus and Function setup:
      1.Look for dead-lettered messages or buildup in the queue.
      2.Review the function code and configuration for any silent exceptions.
      3.Use Azure Monitor or Application Insights to identify any relevant errors, timeouts, or scaling issues.

    If upgrading plans isn’t an option right now, the timer workaround is an easy and cost-effective way to keep the app active.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.