Nginx 504 Gateway timeout error on Azure app service with Angular

Koteswara Pentakota 71 Reputation points
2022-05-25T11:24:37.22+00:00

Hi,

We are facing 504 Gateway timeout errors frequently. When this happens the website also is unresponsive for a couple of minutes.

We could reproduce this even on our lower environments by hitting an api consecutively 2-3 times. While the first time the response comes up the other times it waits for a longer duration and gives 504 timeout error. When this happens or website also does not work.

We are unable to find any traces of the later requests in access.log so the application issue is out of question. We saw if there are any db locks which would have caused by the earlier request and that is also not the case. Infact the first request does no processing at all it just hits and gives a response back immediately.

The production webapp is on App service (Both front end and backend) while the lower environments (dev) are on azurestaticwebapp for frontend and app service for backend.

Any pointers on how to trouble shoot this would really help.

Thanks,
Kotesh

Azure ISV (Independent Software Vendors) and Startups
Azure ISV (Independent Software Vendors) and Startups
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.ISV (Independent Software Vendors) and Startups: A Microsoft program that helps customers adopt Microsoft Cloud solutions and drive user adoption.
111 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,853 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 22,241 Reputation points Microsoft Employee
    2022-05-25T13:30:57.813+00:00

    @Koteswara Pentakota , Apologies you're experiencing timeout and performance issues. To better assist you on this, kindly share the following info:

    Were there any changes prior to this issue or it’s always been this way since the WebApp deployment?
    Do you have an Application Gateway (AGw) in between this App Service WebApp?
    What App Service Plan (ASP)? If you’re using, AGw, is it AGw v1 or v2 SKU?

    Just as quick test, if you’re running a lower ASP tier, scale-up your ASP to Standard tier and then test your WebApp for some time. After the test, you may lower your ASP tier, as necessary.

    If you haven’t done this already, kindly review these logs to further isolate the issue:

    1. You may leverage App Service diagnostics from Azure Portal> Navigate to your App Service app in the Azure Portal.
      --In the left navigation, click on Diagnose and solve problems – Checkout the tile for “Diagnostic Tools” > “Availability and Performance” & "Best Practices" and review to fetch additional information to isolate further.
    2. You may enable logs from Azure Portal (App Service logs blade) to fetch more pointers on the error. You may enable these logs– Application logging, Web Server logging, Detailed Error Messages --Kindly checkout the process here - >>Enable diagnostics logging for apps in Azure App Service