Forum Discussion
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 usually around 4 AM GMT.
From logs I can see that there are 3 server nodes running at the time of the error.
Is there any known issue with Azure function errors running on consumption plan?
Regards,
2 Replies
- harnoor-puniyaniCopper 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.
- Prat09Copper 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.