Azure Functions app stopped working Error codeBadRequest (ServiceUnavailable) from host runtime.

Tahir 20 Reputation points
2025-08-27T12:06:00.47+00:00
  • Error codeBadRequest
  • MessageEncountered an error (ServiceUnavailable) from host runtime.

Please know that i have not made any redeployments or made changes in the code,

The app was fine and working and all of a sudden stopped, this was not based on any actions from my side,

I try to redeploy the exact same code but it says, Service is Unavailable.
I don't see anything in the logs,
I just know that my customers are not able to log in anymore,

In overview section i am seeing a new error (We were not able to load some functions in the list due to errors. Refresh the page to try again.)

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Praveen Kumar Gudipudi 1,495 Reputation points Microsoft External Staff Moderator
    2025-08-27T12:40:06.19+00:00

    Hello @Tahir,

    Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    Please follow the below action plan for now:

    Ensure that none of the critical application settings have been changed or deleted accidentally, which could cause your function app to fail. This usually includes:

    • AzureWebJobsStorage
    • WEBSITE_CONTENTAZUREFILECONNECTIONSTRING
    • WEBSITE_CONTENTSHARE
    1. Firstly, ensure that you have followed these pre-requisites in your local dev environment.

    2.Also ensure that the Func Core tools are up to date.

    3.Please check the AzureWebJobsStorage setting in local.settings.json. You need to update the value to the Azure Storage connection string:

    DefaultEndpointsProtocol=https;AccountName=<ACCOUNT NAME>;AccountKey=<ACCOUNT KEY>;EndpointSuffix=core.windows.net

    4.Please check if your Storage Account has the Firewall / Vnet / tunnelling enabled ? Could you please change the settings to All Network and check if that helps ? More info **here. ** 5.If your FunctionApp has Vnet enabled, check the suggestions here.

    6.The language of your function app is maintained in the FUNCTIONS_WORKER_RUNTIME AppSetting in Azure Function App Portal. Please set python as the value.

    https://learn.microsoft.com/en-us/azure/azure-functions/functions-app-settings#functions_worker_runtime

    7.Please try to deploy using the zip deployment method and check if that helps. You can use the below command to publish your function app:

    func azure functionapp publish <APP_NAME>

    8.Please check the Function App detectors by navigating to the Diagnose and Solve Problems section in the Azure Portal for the Functions as shown below: You can rely on the Function App Down or Reporting Errors setting: User's image

    9.Check the Azure Function App's logs to get more information about the error. You can do this by navigating to the Azure portal, selecting the Function App, and then selecting "Logs" from the left-hand menu. Look for any error messages or exceptions that could be causing the issue.

    User's image

    More Info here.

    Hope this helps.

    If none of the above action plan helps, please let me know. I would be happy to assist you further.


  2. Andrew Lansdowne 0 Reputation points
    2025-11-08T10:01:35.76+00:00

    I had this problem, after a year of not making any changes to a Function which was deployed via Github Actions, it suddenly shows "The service is unavailable." for all function URLs, and the portal says "We were not able to load some functions in the list due to errors. Refresh the page to try again."

    Eventually I realised it's because the env setting "WEBSITE_RUN_FROM_PACKAGE" was pointing to a URL that expired after 1 year.

    So I had to redeploy which created a new package URL which will work for another year... None of the Azure diagnostic pointed towards this as the issue so maybe it will help someone who has the same problem.

    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.