Share via

Why does my queue triggered Azure function occasionally stop working?

Steve Ngapo 5 Reputation points
2025-09-15T03:39:59.25+00:00

I have multiple Azure functions, which are all triggered by me putting a message into a blob storage queue

This works fine most of the time, but occasionally one or more of my functions will just stop executing. I can see the "function execution count" number just drop to zero

When this happens...

  • There are plenty of valid items in the queue
  • There are no 5xx errors happening
  • There is nothing relevant in the eventLog.xml file
  • No settings have been changed
  • There is no spike or change in CPU or memory usage

Most of the time, if I stop and then start the function, it will start executing again in a couple of minutes. But sometimes it will just remain stopped until it decides that it wants to start again, and I will see function executions in the metrics graph again

The function is running in a "function premium" plan

Is there anything that I can do to stop this from happening?

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.


1 answer

Sort by: Most helpful
  1. Anurag Rohikar 3,190 Reputation points Microsoft External Staff Moderator
    2025-09-16T14:03:22.37+00:00

    Hello Steve Ngapo, thanks for patiently sharing all the details and for waiting while we dug deeper. Here’s what we found and recommend:

    Key Findings:

    1. Parsing Issue in function.json: Internal tool flagged “Could not parse function.json”, meaning the runtime couldn’t read your trigger configuration. Your JSON contains comments that aren’t valid. When parsing fails, the function falls back to defaults and can stop polling the queue, which matches the behavior you observed.
    2. Queue Settings Using V1 Format: Your host.json uses the older V1-style queue configuration. On Premium plans running Functions v2+, these settings may be ignored or overridden by backend defaults, leading to inconsistent behavior.

    Recommended Fixes:

    • Clean Up function.json Remove comments and any unrelated properties
    • Upgrade to V2-Style host.json Update your host.json so the queue settings live under extensions.queues:
    {
      "version": "2.0",
      "functionTimeout": "00:10:00",
      "extensions": {
        "queues": {
          "maxDequeueCount": 5,
          "batchSize": 32,
          "newBatchThreshold": 16,
          "visibilityTimeout": "00:03:00"
        }
      }
    }
    

    This ensures the runtime applies your desired batch size and retry behavior instead of defaulting to backend values.

    Next Steps:

    1. Redeploy the cleaned function.json and upgraded host.json.
    2. Restart the function app after deployment so the runtime reloads configuration.
    3. Over the next 24–48 hours, monitor the function’s execution count and queue metrics in the Azure portal (Function App → Monitoring → Invocation count / Failures and Storage Account → Queue metrics) to confirm consistent processing.
    4. If you see any further pauses, capture the exact timeframe so we can re-check logs and backend diagnostics.

    References:

    I hope the above information helps and fix your issue. Please do let us know for any further questions. Thank you!

    1 person found this answer helpful.
    0 comments No comments

Your answer

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