503 'The service is unavailable.' when calling Azure function

Phan Huy Hoang (LAB.SC) 0 Reputation points
2025-05-22T07:52:45.8933333+00:00

Hi,
I'm currently encounter the 503 error when triggering HTTP an Azure function, the function worked very well few days ago but as for now i encounter this annoying error.
The 503 error means that there is a problem with the Function gateway right ?
I checked the log activity and didn't see anything related to the 503 error, saw the Sync Web Apps Function Triggers failed though.
And because it cannot reach to the service so it's not log anything to the Application Insight too, probably.
It's not because of the CPU/MEM because i checked it.
I'm still fine a way to fix this

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,911 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Ranashekar Guda 2,820 Reputation points Microsoft External Staff Moderator
    2025-05-22T19:25:43.1633333+00:00

    Hello @Phan Huy Hoang (LAB.SC),

    A 503 "Service Unavailable" error when calling an Azure Function typically means the runtime is currently unreachable, and this can happen for several reasons. Since the function was working fine recently, I recommend starting with a few quick checks, restart the Function App from the Azure Portal, and verify if there are any ongoing outages in your region using Azure Service Health. You also mentioned that “Sync Web Apps Function Triggers failed,” which can prevent functions from executing.

    Try manually syncing the triggers through the Azure Portal or using the Azure CLI (func azure functionapp publish <APP_NAME> --force). Additionally, check if your app has hit a daily execution quota (especially on the Consumption Plan), or if there have been any recent configuration changes, such as modifying read-only app settings or network restrictions. If your app is hosted in an App Service Environment (ASE) or has IP restrictions, ensure it’s not unintentionally blocking access.

    Also, be aware that host ID collisions or authentication overrides (such as Azure AD or ASP.NET auth) can interfere with function execution. Since the function isn’t logging to Application Insights, it’s likely the runtime is failing before it starts. To gain more visibility, enable diagnostic logs in the App Service settings and consider setting up AutoHeal to automatically recover from 503 errors.

    Another possible issue is Function App Scaling Limitations, particularly if the function is hosted on a Consumption Plan. Scaling delays or cold starts can sometimes result in a 503 error. Switching to a Premium Plan or Dedicated Plan could provide better reliability.
    Kindly refer below links:
    Troubleshoot error: "Azure Functions Runtime is unreachable"
    https://stackoverflow.com/questions/70212651/azure-functionapp-publish-failing-on-syncing-triggers
    https://techcommunity.microsoft.com/blog/appsonazureblog/simple-self-troubleshooting-steps-for-function-app-not-seeing-triggers/4167100

    Hope this helps. Do let us know if you any further queries.

    0 comments No comments

  2. Anonymous
    2025-05-26T04:43:47.2166667+00:00

    This typically indicates that the service is temporarily unavailable. This can be due to several reasons, including issues with the Azure Function gateway, scaling problems, or even service outages. Try scaling up/down to see if the issue resolve, looks like a server issue.

    Kindly select "Accept answer" if this help.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.