Gateway Timeout on some clients

Ryan Ad 1 Reputation point
2021-02-06T10:25:23.357+00:00

Me and another developer got our .NET Core microservices up and running on AKS by following the steps on this page. Everything seems to work when I tested the registration feature on my browser, but it does not work on the other developer's browser and returned 504 (Gateway Timeout). We both tested the web app on our mobile devices and they both failed for the same reason 504 (Gateway Timeout).

Since my browser can register an account, I went ahead and created an account, the login feature works on both our mobile devices.

Successful request logs from the gateway

info: Microsoft.AspNetCore.Hosting.Diagnostics1
Request starting HTTP/1.1 POST http://abc.com/security-api/connect/token application/x-www-form-urlencoded 71
info: Microsoft.AspNetCore.Cors.Infrastructure.CorsService[4]
CORS policy execution successful.
info: Ocelot.RateLimit.Middleware.ClientRateLimitMiddleware[0]
requestId: 0HM6AE65US3VV:00000004, previousRequestId: no previous request id, message: EndpointRateLimiting is not enabled for /connect/token
info: Ocelot.Authentication.Middleware.AuthenticationMiddleware[0]
requestId: 0HM6AE65US3VV:00000004, previousRequestId: no previous request id, message: No authentication needed for /security-api/connect/token
info: Ocelot.Authorization.Middleware.AuthorizationMiddleware[0]
requestId: 0HM6AE65US3VV:00000004, previousRequestId: no previous request id, message: /connect/token route does not require user to be authorized
info: Ocelot.Requester.Middleware.HttpRequesterMiddleware[0]
requestId: 0HM6AE65US3VV:00000004, previousRequestId: no previous request id, message: 200 (OK) status code, request uri: http://10.244.4.8/connect/token
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished HTTP/1.1 POST http://abc.com/security-api/connect/token application/x-www-form-urlencoded 71 - 200 1163 application/json;+charset=utf-8 311.1511ms
info: Microsoft.AspNetCore.Hosting.Diagnostics1
Request starting HTTP/1.1 OPTIONS http://abc.com/security-api/users/client/register - -
info: Microsoft.AspNetCore.Cors.Infrastructure.CorsService[4]
CORS policy execution successful.
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished HTTP/1.1 OPTIONS http://abc.com/security-api/users/client/register - - - 204 - - 0.1194ms
info: Microsoft.AspNetCore.Hosting.Diagnostics1
Request starting HTTP/1.1 POST http://abc.com/security-api/users/client/register application/json 19384
info: Microsoft.AspNetCore.Cors.Infrastructure.CorsService[4]
CORS policy execution successful.
info: Ocelot.RateLimit.Middleware.ClientRateLimitMiddleware[0]
<More stuff happened after this...>

Unsuccessful request logs from the gateway

info: Microsoft.AspNetCore.Hosting.Diagnostics1
Request starting HTTP/1.1 POST http://abc.com/security-api/connect/token application/x-www-form-urlencoded 71
info: Microsoft.AspNetCore.Cors.Infrastructure.CorsService[4]
CORS policy execution successful.
info: Ocelot.RateLimit.Middleware.ClientRateLimitMiddleware[0]
requestId: 0HM6AE65US3VV:00000002, previousRequestId: no previous request id, message: EndpointRateLimiting is not enabled for /connect/token
info: Ocelot.Authentication.Middleware.AuthenticationMiddleware[0]
requestId: 0HM6AE65US3VV:00000002, previousRequestId: no previous request id, message: No authentication needed for /security-api/connect/token
info: Ocelot.Authorization.Middleware.AuthorizationMiddleware[0]
requestId: 0HM6AE65US3VV:00000002, previousRequestId: no previous request id, message: /connect/token route does not require user to be authorized
info: Ocelot.Requester.Middleware.HttpRequesterMiddleware[0]
requestId: 0HM6AE65US3VV:00000002, previousRequestId: no previous request id, message: 200 (OK) status code, request uri: http://10.244.4.8/connect/token
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished HTTP/1.1 POST http://abc.com/security-api/connect/token application/x-www-form-urlencoded 71 - 200 1163 application/json;+charset=utf-8 331.2298ms
info: Microsoft.AspNetCore.Hosting.Diagnostics1
Request starting HTTP/1.1 OPTIONS http://abc.com/security-api/users/client/register - -
info: Microsoft.AspNetCore.Cors.Infrastructure.CorsService[4]
CORS policy execution successful.
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished HTTP/1.1 OPTIONS http://abc.com/security-api/users/client/register - - - 204 - - 0.3665ms
<It stops here...>

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,182 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,097 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.