microsoft / service-fabric-aspnetcore

This repo contains ASP.NET Core integration for Service Fabric Reliable Services.
Other
152 stars 49 forks source link

Getting 502 BadGateway Error #72

Closed mathavanmani closed 5 years ago

mathavanmani commented 5 years ago

Hi,

Getting 502, BadGateway error part of the Service Fabric ASP.Net core web API.

One of the Put Method I have got part of a controller takes more than 10 mins to execute, But I'm getting 502/BadGateway response in 2 mins time. I have done the following bits.

  1. Setting timeout part of KestrelCommunicationListener return new WebHostBuilder() .UseKestrel(o => {o.Limits.KeepAliveTimeout = TimeSpan.FromHours(1);}) .ConfigureServices( services => services .AddSingleton(serviceContext)) .UseContentRoot(Directory.GetCurrentDirectory()) .UseStartup()
    .UseServiceFabricIntegration(listener, ServiceFabricIntegrationOptions.None) .UseUrls(url) .Build();

  2. Also set the time out in web.config.

  3. Have also set the client timeout part of HttpClient initialization.

Please let me know how I can resolve this issue.

amanbha commented 5 years ago

@mathavanmani This doesn't seems like a Service Fabric issue, could you debug your service code for this call?