An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
Hello **Ahmad Mahmood
**I understand you’re encountering a 504 error when accessing the front door URL.
Could you let me know what the backend for the front door is?
Also, please check the front door access logs to see how much time the server is taking during the 504 error. Compare the time taken by the front door and the server. If the backend is taking more time, try increasing the timeout at the front door level and check again.**
**You can also collect the tracking reference ID in the access logs when encountering the 504 error. Use this reference ID to check logs in your Azure portal. Please refer to the following document for collecting the logs:
According to Microsoft’s troubleshooting documentation, a 504 response from Azure Front Door usually happens when:
- The origin server takes longer than the set timeout to respond.
- The backends response transmission goes beyond the allowed timeout period.
- Or the origin server cannot be reached from the Azure Front Door edge network.
- And check if you have configured the health probe and whether it is responding properly.
Azure Front Door also checks backend health using regular health probes. These probes use the same routing protocol and port, and the backend must return an HTTP 200 OK response to be seen as healthy. Any other response or connection issue may mark the origin as unhealthy, leading to request failures or timeout errors.
Reference document:
https://learn.microsoft.com/en-us/troubleshoot/azure/front-door/troubleshoot-issues
https://learn.microsoft.com/en-us/azure/frontdoor/health-probes
Additionally, Azure Front Door Standard/Premium lets you set the Origin Response Timeout between 16 and 240 seconds. If your backend needs more time to process requests in certain cases, adjusting this timeout may reduce such responses. It’s also important to check backend performance and connectivity.
At this point, we suggest checking the backend network allow-list, health probe setup, Origin Host Header, and TLS certificate alignment in your Azure Front Door configuration for the application.
I hope the above answer helps you! Please let us know if you have any further questions.
Please don't forget to "upvote" where the information provided will help you, this can be beneficial to other members of the community.
and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.