Year ago started to develop web service (WEB API) based on dotnet core 1.0 with push notifications ability.
Used for this SignalR, because I was already familiar with this library from .net framework.
All works fine as expected. After a few month of development migrated to dot net core 1.1. All was fine.
The web application is used like a service (widget). Requests are sent to it from another web site (making initial requests, get js scripts, establishing websocket connection). A month ago first release was made to production server (windows server 2016). All worked fine as expected. Over 500-600 simultaneous connections were being handled.
After that time, a lot of work was made (mostly busines logic and replacing EF with Dapper). And it was discovered that locally on the dev environment no more than 10 websocket connections could be established. All other requests (GET requests) to the service are in pending state. If one connection is closed, then the next receives response.
If I remove establishing of websocket connection from js ($.connection.hub.start()), then all is fine, no pending requests. No exception, no errors or warnings in logs. IIS logs don't have any entries either, like no requests were made.
On production, when the release has been applied, the situation is similar. Just pending state on all requests.
If switching back to the branch without the new features (without Dapper), locally it still handles only 10 connections, but on production all is fine, all same 500-600 connections are stable.
I created a separate branch to migrate from 1.1 to 2.0 and use Microsoft.AspNetCore.SignalR -Version 1.0.0-alpha2-final, but there is no direct compatibility, and lack of functionality (at least it's not possible to send a message to a specified range of connections ids). So lots of additional work and tests needed, and I'm not sure if it will help at all.
Here is a sample for reproduction.
MainSite is .Net Framework project.
Service is .Net Core 1.1 project
Both must be hosted in IIS. MainSite binding: localhost:8080, Service binding: localhost:8081. On my current development machine, I can establish 3 websocket connectionsbefore I start receiving a failure.
Installed DotNetCore.1.0.7_1.1.4-WindowsHosting.exe to enable ANCM in IIS. (DotNetCore.1.0.8_1.1.5-WindowsHosting can not be installed because of the bug)
Steps to reproduce:
Open MainSite page. Open dev console. Current connected clients count should be logged.
Open MainSite in new tab once more. Current connected clients count should increment.
Open MainSite once more in new tab. Nothing happens.
Open dev console of current new opened tab, go to Netwark tab, Refresh page. See Pending Request. Open one more tab with MainSIte. In Netrowk tab connection to Hub or to widget should be in pending state.
Close second tab, third tab should recieve response.
Year ago started to develop web service (WEB API) based on dotnet core 1.0 with push notifications ability. Used for this SignalR, because I was already familiar with this library from .net framework.
Unfortunately there wasn't any official release for this library under dncore, so i used this: "Microsoft.AspNetCore.SignalR.Server": "0.2.0-*" from https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json
All works fine as expected. After a few month of development migrated to dot net core 1.1. All was fine. The web application is used like a service (widget). Requests are sent to it from another web site (making initial requests, get js scripts, establishing websocket connection). A month ago first release was made to production server (windows server 2016). All worked fine as expected. Over 500-600 simultaneous connections were being handled.
After that time, a lot of work was made (mostly busines logic and replacing EF with Dapper). And it was discovered that locally on the dev environment no more than 10 websocket connections could be established. All other requests (GET requests) to the service are in pending state. If one connection is closed, then the next receives response.
If I remove establishing of websocket connection from js ($.connection.hub.start()), then all is fine, no pending requests. No exception, no errors or warnings in logs. IIS logs don't have any entries either, like no requests were made.
On production, when the release has been applied, the situation is similar. Just pending state on all requests.
If switching back to the branch without the new features (without Dapper), locally it still handles only 10 connections, but on production all is fine, all same 500-600 connections are stable.
Dev environment dotnet core sdk versions installed: 1.0.1, 1.0.4, 1.1.0, 1.1.5, 1.1.6, 2.0.2, 2.0.3, 2.1.2 Server dotnet core runtime versions installed: 1.0.4, 1.0.5, 1.0.8, 1.1.1, 1.1.2, 1.1.5, 2.0.3
Could it be possible that application created on 1.1.5 framework version will work incorrect with aspnetcore iis module version 2.0.3 installed?
deps.json main diff between working and failing version:
I created a separate branch to migrate from 1.1 to 2.0 and use Microsoft.AspNetCore.SignalR -Version 1.0.0-alpha2-final, but there is no direct compatibility, and lack of functionality (at least it's not possible to send a message to a specified range of connections ids). So lots of additional work and tests needed, and I'm not sure if it will help at all.
Here is a sample for reproduction. MainSite is .Net Framework project. Service is .Net Core 1.1 project Both must be hosted in IIS. MainSite binding: localhost:8080, Service binding: localhost:8081. On my current development machine, I can establish 3 websocket connectionsbefore I start receiving a failure. Installed DotNetCore.1.0.7_1.1.4-WindowsHosting.exe to enable ANCM in IIS. (DotNetCore.1.0.8_1.1.5-WindowsHosting can not be installed because of the bug) Steps to reproduce: