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.