Hello David Lussky,
Thanks for your question.
504s can be for a lot of reasons. You will need to review the logs to get the exact reason this may be happening.By default, the Azure Application Gateway returns a 504 Error when the time of the request exceeds 20 seconds.
Generally the best step is to troubleshoot why with Azure's diagnosyics https://learn.microsoft.com/en-us/azure/app-service/overview-diagnostics if configured. If not:
I say you try the steps below:
- Restart the App Service - Sometimes resolves temporary issues
- Scale up temporarily
- Roll back if a recent deployment caused the issue
You can mark it 'Accept Answer' and 'Upvote' if this helped you
Regards,
Abiola