'Function App runs fine locally but fails when deployed to Azure
Following Microsoft Quick Start for Function App with Go (https://docs.microsoft.com/en-us/azure/azure-functions/create-first-function-vs-code-other?tabs=go%2Cwindows)
I was able to successfully run the code locally on my Windows computer. I continued to follow the steps to deploy the Function App to Azure portal and when try to run the Function App at the /api/HttpExample endpoint. It would fail to execute even though it runs fine locally.
Programming language used : Go 1.17.7
Links to source: https://docs.microsoft.com/en-us/azure/azure-functions/create-first-function-vs-code-other?tabs=go%2Cwindows
Bindings used
Solution 1:[1]
- I have tried to access the deployed GO Function, got 502 Bad Gateway error
- There could be many reasons for 502 errors.
This problem is frequently caused by program-level difficulties, such as slow requests, high memory/CPU usage, and application crashes due to an exception. - When I tried to access the app, got request timeout error

- Tried to change the functionTimeOut to 10 min in host.json and re-deployed the function app, got the HTTP 500 error .
- Select the "Function app down or reporting" detector from the "Diagnose and Solve problems" blade in the Azure Function App.
- You can send an email to Microsoft Azure Support @
[email protected], with your subscription ID with clear screenshots of your function app.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | HarshithaVeeramalla-MT |



