How to Solve 504 Gateway Time-Out Errors with Azure Application Gateway
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (175).NET Core  (29).NET MAUI  (208)Angular  (109)ASP.NET  (51)ASP.NET Core  (82)ASP.NET MVC  (89)Azure  (41)Black Friday Deal  (1)Blazor  (220)BoldSign  (15)DocIO  (24)Essential JS 2  (107)Essential Studio  (200)File Formats  (67)Flutter  (133)JavaScript  (221)Microsoft  (119)PDF  (81)Python  (1)React  (101)Streamlit  (1)Succinctly series  (131)Syncfusion  (920)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (51)Windows Forms  (61)WinUI  (68)WPF  (159)Xamarin  (161)XlsIO  (37)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (8)Business intelligence  (55)Button  (4)C#  (151)Chart  (132)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (63)Development  (633)Doc  (8)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (41)Extensions  (22)File Manager  (7)Gantt  (18)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (508)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (43)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (12)Scheduler  (52)Security  (3)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (31)Solution Services  (4)Spreadsheet  (11)SQL  (11)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (387)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (597)What's new  (333)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)

How to Solve 504 Gateway Time-Out Errors with Azure Application Gateway

When a browser attempts to load a website, a request is typically made to a web server. An HTTP 504 error code is sent to the browser when the request takes too long to complete. This error might be temporary due to heavy traffic to the website, or it might be due to a resource or request taking too much time to load.

One of our previous articles, 8 Common HTTP Error Codes and Their Possible Fixes, explains a 504 gateway time-out error, its causes, and possible fixes.

This blog will explain how to resolve a 504 gateway time-out error in Azure Application Gateway (AAG) caused by an application error or performance issues.

Azure Application Gateway

As per Microsoft, AAG is a web traffic load balancer enabling us to manage web application traffic. The following features of AAG make it a practical and universally available load balancer:

  • Secure sockets layer (SSL/TLS) termination
  • Autoscaling
  • Web application firewall
  • URL-based routing
  • Multiple-site hosting
  • Redirection
  • Connection draining

AAG has proven very useful with the increased usage of Azure resources for applications. Check the AAG overview documentation for detailed explanations of its other features.

What does the 504 error look like, and what is its cause?

A user receives a 504 error in their browser when there is a long-running request related to the site accessed or some action that the user has performed in the web application. The issue in the browser looks like this:

504 Gateway Time-Out Error
504 Gateway Time-Out Error

The cause of this error is that AAG has not received a timely response from the application server. The gateway waits for the response, and if it does not receive one within the time-out period, it throws the 504 error.

How to fix the issue

Since we are concentrating on an issue with the application code, we can address the time-out issue by increasing the AAG request time-out period gradually until we can use the application and perform the request successfully. By default, the AAG request time-out period is 20 seconds.

For example, let’s say we are trying to retrieve data for a data grid control, and it takes 30 seconds to process this request. We get a 504-gateway time-out error because the time-out period is 20 seconds. If we increase the time-out period to 40 seconds, the page will load adequately without any problems.

Conclusion

Thank you for reading this blog. I hope that you gained a better understanding of why the 504 gateway time-out issue occurs when using Azure Application Gateway, and that you now have the knowledge to solve the problem quickly.

Additionally, I would like to bring to your attention the recent release of Essential Studio 2023 Volume 2. You can explore all of the new features in our Release Notes and the What’s New pages, and even try the new features out for yourself with a free trial.

Should you have any further questions, please don’t hesitate to ask. You can leave your inquiries in the comments section below, or reach out to us through our support forumsupport portal, or feedback portal. We are always here to assist you.

Related blogs

Tags:

Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed