Azure Function App - Error: Encountered an error (ServiceUnavailable) from host runtime

Syed Muhammad Hani 30 Reputation points
2023-10-20T17:05:22.9933333+00:00

I am trying to deploy an Azure Function in python to a Function App, but I keep getting this error message in logs. Service Health shows no issue, I've double checked all connection strings, and checked the available solutions which suggest removing WEBSITE_RUN_FROM_PACKAGE from settings. This same function app was previously working fine, started having this issue two days ago.

Logs for the error as as follows:

Syncing triggers...
9:42:56 AM extract-attachment1: Syncing triggers (Attempt 2/6)...
9:43:07 AM extract-attachment1: Syncing triggers (Attempt 3/6)...
9:43:29 AM extract-attachment1: Syncing triggers (Attempt 4/6)...
9:44:11 AM extract-attachment1: Syncing triggers (Attempt 5/6)...
9:45:32 AM extract-attachment1: Syncing triggers (Attempt 6/6)...
9:45:34 AM: Error: Encountered an error (ServiceUnavailable) from host runtime.
Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.


4 answers

Sort by: Most helpful
  1. Rakesh Karia 5 Reputation points
    2025-05-22T05:38:31.3133333+00:00

    Usually I have seen bug in azure function app and logic app. I have re-created function app and problem was resolved. Microsoft will never accept that there is an issue with their host

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    1 deleted comment

    Comments have been turned off. Learn more

  3. Narcis Dumitrescu 0 Reputation points
    2025-11-27T15:06:56.1233333+00:00

    In my case it was a bad secret config missing in key vault

    Amazing the self diagnose really helped

    User's image

    Then at the bottom I saw:

    [ResolveWorkitem] SecretNotFound error while retrieving Key Vault Secret Reference @Microsoft.KeyVault(VaultName=XXXX;SecretName=xxxxx-access-key). Exception: KeyVaultResolver.Common.ReferenceResolverException: Exception of type 'KeyVaultResolver.Common.ReferenceResolverException ...

    Was this answer helpful?

    0 comments No comments

  4. Jose Gonzalez 0 Reputation points
    2025-02-12T15:27:39.8966667+00:00

    In my case, I had set a timeout in the host.json file that was too large compared with the consumption plan.
    Reducing the timeout value to an acceptable value solved the problem

    Was this answer helpful?

    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.