Skip to content

Server error 502 - Web server received an invalid response while acting as a gateway or proxy server #5390

@debashish2014

Description

@debashish2014

Hi,

I have written a Console application to do load testing and I am using c# Microsoft.AspNetCore.SignalR.Client.Core.HubConnectionBuilder for creating connections to AspNet Core SignalR application, which is hosted on IIS running on a Windows Server 2012 R2 having 8 Cores and 32 GB RAM.

We have a single Hub in the project, with below method.

public async Task Send(string name, string message)
{
         await Clients.All.SendAsync("BroadcastMessage", name, message);
}

.Net Clr Version of Application pool has been set to No Managed Code.

We are able to reach up to 16000 connections approx. Any subsequent request to the IIS leads to below error:

image

The application targets .Net Core 2.1

image

We have tried deploying the applction on a Azure VM (8 Cores, 32 Gb RAM, Windows Server 2016) as well, but the result is same.

IIS configuration appConcurrentRequestLimit has been set to 80000

appcmd.exe set config /section:system.webserver/serverRuntime /appConcurrentRequestLimit:80000

We also tried modifying below Kestrel settings, but ended up in vain.

.UseKestrel(options =>
        {
            options.Limits.MaxConcurrentConnections = 80000;
            options.Limits.MaxConcurrentUpgradedConnections = 80000;
        });

Are we missing anything?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions