Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

504 Gateway Timeout for Azure ASP.NET Core 8 app deployed on linux

I have a long-running Razor page. I am getting the following response after about 4 minutes:

504.0 GatewayTimeout

I have tried the information here.

I've updated my start up code with

builder.Services.AddRequestTimeouts();

and

app.UseRouting();

I've used the RequestTimeout attribute specifying a time, I've used it with a policy, and I've also tried the DisableRequestTimeout attribute. I've tried these attributes at the page (class) level as well as on the endpoint (method). Nothing seems to have any effect.

What am I missing?

like image 904
Donny Kwitty Avatar asked Dec 06 '25 13:12

Donny Kwitty


1 Answers

Are you using Azure to host your application? I had the exact same problem, I tried everything, including pulling out some of what's left of my hair, until I finally found this: https://learn.microsoft.com/en-us/troubleshoot/azure/app-service/web-apps-performance-faqs#why-does-my-request-time-out-after-230-seconds It can't be overridden...

like image 156
arezero Avatar answered Dec 08 '25 02:12

arezero



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!