Azure / Azure/azure-functions-host
Queue Trigger - Consumption Plan - Goes to sleep and does not wake up
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
#### Check for a solution in the Azure portal
We have a simple Azure Function that is running on a Consumption ASP. The function runs fine when initially deployed or when "poked" from the Azure Portal - but after a period of time, goes to sleep and does not wake up, even if new messages arrive in the corresponding queue.
Please provide the following:
- Timestamp: 10/4/2024 2:50 PM CST
- Function App version:
- Function App name: KermitFunctions
- Function name(s) (as appropriate): QueuePackager
- Invocation ID:
- Region: Central US
#### Repro steps
Provide the steps required to reproduce the problem:
1) QueueTrigger function using Managed Identity and App Settings Connection information.
2) Deploy function
3) Add msg to queue
4) Msg processes.
5) Wait 20-30 minutes (AppInsights log will show several "Disposing ScriptHost" messages)
6) Add msg to queue
7) Msg is never processed.
#### Expected behavior
Expected that QueueTrigger would eventually wake up and process the incoming message.
#### Actual behavior
QueueTrigger never wakes up.
#### Known workarounds
Go to Azure Portal and view Function. It will wake up and process.
#### Related information
Contributor guide
Research direction
Start with the QueueTrigger reproduction steps and review the App Insights logs for the reported "Disposing ScriptHost" messages after 20–30 minutes. Compare behavior before and after the Azure Portal workaround; done means a new queue message wakes the Consumption Plan function and is processed without portal interaction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100