How to fix web app deployment not loading - 504.0 GatewayTimeout

Dio 0 Reputation points

Hello,

My web app does not load and instead times out after a few minutes to the 504.0 Gateway Timeout error.

I am using the Azure Database for PostgreSQL flexible server and Azure Plan as the subscription and Node as the Runtime stack. Perhaps it is due to the scaling and I am using the free plan?

Here is my website! Please let me know if you need anything else

https://plan-it-matt-cha.azurewebsites.net/

0 comments No comments

Sign in to comment

1 answer

  1. Dan Rios 2,050 Reputation points MVP

    Hi

    The website seems to load for me at the moment.

    However I would follow these steps to try and see what errors there are for you to look into further:

    Theres a great native troubleshooting tool you can leverage to help identify your issues.

    Go to your Azure app and on the left navigate down to Resource Health > Diagnose and troubleshoot button in this view

    From here you should be able to get an overview of the errors with suggested fixes for these.

    You can read more here:

    https://learn.microsoft.com/en-us/azure/app-service/overview-diagnostics

    If you have any further questions or need any further help drop a reply and I’ll be happy to try and assist further. If this was helpful in solving your issue then please mark it as an accepted answer so others can benefit from the resolution.

    1. Dio 0 Reputation points

      Hi! I'm getting the response "Distributing your web app across multiple instances" under the Diagnostics. I'm going through the steps for Autoscale under Monitor but I don't have the option to change it from Instance Count 1 to anything else, is it not available on the free plan perhaps?

    2. Dan Rios 2,050 Reputation points MVP

      Those shouldn’t have any impact on the 504 errors you were seeing, as I see those often and they are just Microsoft recommendations for app availability. There should be an App crash or similar area where you may be able to see more specific information to your original issue? Is it still happening frequently? You can also go to the app console logs and check what that’s saying during the issue as well to get extra logs.

    3. Dan Rios 2,050 Reputation points MVP

      As you’re on the free plan and getting 504 errors it may be due to maxing out compute power of the app. If you go to the overview of the app and review the monitoring metrics can you see memory or CPU maxing out? If so it may be that you need to consider scaling the plan to get more compute power if so.

    4. Dio 0 Reputation points

      I don't see any errors about an app crash in the health diagnostics area. Previously the page would load after a long time of waiting like a few minutes length of time and now it seems to be working... would you happen to know what I can do to fix this in the future?

    5. Dan Rios 2,050 Reputation points MVP

      I would review the apps CPU and memory metrics. As you’re on the free plan it may be that sometimes it is running out of compute capacity. You can review the performance metrics on the overview page of the Azure App and see if it is maxing out. If it has done during the issue then you may want to scale the plan to Basic and see if that helps solve your problem.


    Sign in to comment
Sign in to answer

Your answer