Hello Esmee Lucassen,
Thank you for posting your question in the Microsoft Q&A forum.
The exception you're encountering indicates that the function app is failing due to a System.ArgumentNullException in the SharedBlobQueueProcessor class. Specifically, the issue occurs when trying to retrieve a value from a ConcurrentDictionary using a null key. This is causing the function app to restart repeatedly.
The error suggests that the function app is processing a message from a queue (likely a Storage Queue or Blob Trigger) and encountering a null key when attempting to handle a poison message. Poison messages are messages that fail repeatedly and are moved to a poison queue for further inspection.
You may need to try inspecting the queue or blob that the function app is processing. Look for messages with missing or null properties that could cause the key parameter to be null. Use tools like Azure Storage Explorer or the Azure Portal to examine the queue messages.
Try to verify below steps:
- Add error handling and logging to the function app to catch and log exceptions before they cause the host to shut down.
- Ensure that the queue or blob trigger is correctly configured in the host.json and local.settings.json files.
- Check the poison queue for any messages that might be causing the issue.
- Ensure that the Microsoft.Azure.WebJobs.Extensions.Storage package is up to date
- Enable Application Insights for the function app to capture detailed logs and exceptions. In the Azure Portal, navigate to your function app, go to Settings > Application Insights, and enable it.
- Restart the function app to clear any transient issues.
- Ensure that the storage account used by the function app is properly configured and accessible.
The issue is likely caused by a malformed message or a misconfiguration in the queue or blob trigger. By inspecting the messages, updating the code, and enabling detailed logging, you should be able to identify and resolve the root cause.
Some useful links you may refer:
- https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-error-pages?tabs=fixed-delay%2Cisolated-process%2Cnode-v4%2Cpython-v2&pivots=programming-language-csharp
- https://learn.microsoft.com/en-us/azure/azure-functions/functions-host-json
- https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-queue-trigger?tabs=python-v2%2Cisolated-process%2Cnodejs-v4%2Cextensionv5&pivots=programming-language-csharp#poison-messages
If the above answer helped, please do not forget to "Accept Answer" as this may help other community members to refer the info if facing a similar issue.