I have a VS 2017 C# developed Azure Function App deployed on the consumption plan using the VS 2017 Publish mechanism. All functions are timer or Service Bus triggered. I see a status of running in the Azure Portal and the functions appear to be working e.g. writing rows to a SQL Azure database, however, I am constantly encountering errors in the Azure Portal when trying to inspect or Monitor the functions e.g. a red error box pops up with the Error :
The function runtime is unable to start.
Session Id : xxxxxxxx
Timestamp : xxxxxxx
I have looked in the logs and cannot see anything obvious in the log files, I tried deploying to a new App Service and that fixed the issue for a while but it has come back. I have wrapped all my functions in exception handlers and Exception messages to the TraceWriter, all functions are quite fast to execute ~ max 30-40seconds. Occasionally I have also seen errors saying "You do not have permission xxx".
Any help much appreciated.
Search for your storage account in the Azure portal to see whether it still exists. If it has been deleted, re-create the storage account and replace your storage connection strings. Your function code is lost, and you need to redeploy it.
In the Azure portal, browse to your function app. Under Settings, choose Configuration. In the Function runtime settings tab, locate the Runtime version. Note the specific runtime version.
Navigate to your function app in the Azure portal. Select Diagnose and solve problems to open Azure Functions diagnostics. Choose a category that best describes the issue of your function app by using the keywords in the homepage tile. You can also type a keyword that best describes your issue in the search bar.
AzureWebJobsStorage. The Azure Functions runtime uses this storage account connection string for normal operation. Some uses of this storage account include key management, timer trigger management, and Event Hubs checkpoints. The storage account must be a general-purpose one that supports blobs, queues, and tables.
This issue can be caused by numerous things. Really you need to look into the logs to see the underlying issue.
A good debugging option here is to connect to live streaming. So in your function scroll down the left hand pane to Monitoring and select the Log streaming option:
This will connect a live stream to your functions logging:
Where you should see logs identifying why the function is unable to start
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With