Hello WPSAutoAdmin
I understand that You're facing a frustrating and concerning issue with intermittent Blob trigger failures in your Azure IoT Hub and Function App setup. The intermittent issue you're experiencing with Azure Blob Storage triggers not firing for certain blobs can be concerning, especially given the reliability you've had for the past 18 months.
Trigger Failures:
- Azure Blob Storage utilizes Azure Event Grid to initiate events upon the creation of blobs. In the event of any complications with Event Grid, there is a possibility that it may fail to deliver events related to specific blob creations.
- Examine the Azure Service Health dashboard to determine if there are any current issues affecting Event Grid or Blob Storage in your area.
Throttling Failures:
- In the event that a significant quantity of blobs is generated within a brief timeframe, it is possible that you are encountering throttling limits. Both Azure Functions and Event Grid impose certain quotas and limitations, and surpassing these thresholds may result in the loss of events.
- It is advisable to monitor the metrics associated with your Azure Function App and Event Grid to determine if you are nearing any of these limits.
- If your Azure Function App encounters errors while processing previous blobs, it may not be able to process new events. Check the logs for your Function App to see if there are any errors or exceptions being thrown.
- Ensure that your function is set to handle retries appropriately.
It is important to note that if your IoT Hub is producing an exceptionally high volume of messages, it may be surpassing the throughput limits of the storage endpoint. Please verify that your storage account is not reaching any limitations, such as IOPS or bandwidth.
- Additionally, examine your IoT Hub message routing configuration.
- Conduct a comprehensive test of your routing query.
Confirm that the configuration of your Blob trigger within the Function App is accurate. Make certain that the concurrency limits of your Function App are adequate to manage the volume of incoming messages.
- Review your Function App's trigger configuration.
- Monitor your Function App's performance and scale it up if needed.
It is essential to verify that any firewalls or virtual network rules established on the storage account do not obstruct access to the IoT Hub. Additionally, if private endpoints are in use, please confirm that these endpoints are functioning properly.
- Review the network configuration of the storage account.
There may be a minor delay in the visibility of Log Analytics data. Please verify that your Log Analytics queries are not excluding the pertinent "PutBlob" operations.
- Ensure that adequate time is provided for the logs to propagate
- Double-check your Log Analytics queries.
Post which Monitor the storage account's metrics for any errors or throttling events. Verify that messages are being routed correctly to the Blob Storage container. Examine the Function App's logs for any errors or warnings. Temporarily simplify your setup by routing a small number of test messages to a separate Blob Storage container and Function App.
Hope the above answer helps! Please let us know do you have any further queries.
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.