Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Functions Portal error - The function runtime is unable to start

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.

like image 931
Chris W Avatar asked Mar 10 '18 19:03

Chris W


People also ask

How do I fix runtime unreachable Azure?

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.

How do I check Azure function runtime?

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.

How do I troubleshoot Azure function?

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.

What is AzureWebJobsStorage?

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.


1 Answers

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:

enter image description here

This will connect a live stream to your functions logging:

enter image description here

Where you should see logs identifying why the function is unable to start

like image 124
Liam Avatar answered Oct 17 '22 03:10

Liam