Forum Discussion
Prat09
Mar 25, 2025Copper Contributor
Error on Function APP - 502 Bad Gateway
Hi All, This is with regards to my setup in Azure function, I'm currently using .NET 6 and Consumption plan. But intermittently I'm getting 502 Bad Gateway while calling the api. It happens usual...
harnoor-puniyani
Mar 27, 2025Copper Contributor
How long does the downtime usually persists, if its only for a shortwhile maybe its due to the instance switching. Additionally the last logs before the 502 error does it indicate any shutdowns or errors?
For identifying the problem, have you tried the diagnostic tools?
Some recommended configurations to check
- Under the configurations -> Always on setting is enabled
- Configure the Health check on your function app
- Your function app is runing on .NET 6 , considering upgrading to the latest stable version.
Prat09
Apr 01, 2025Copper Contributor
The trend is that we get this error while the api have a surge in traffic. Usually in the morning hours. The downtime is for a minute, but only some api calls fails. So, assuming that the load balancer moves request to one of the server which is already taken out while scaling down.