self hosting example, I found out in signalr documentation using Owin. is any way to host it without Owin? how i can configure Owin to accept more connections?
Microsoft.Owin.Host.HttpListener (and Microsoft.Owin.Host.HttpSys) has a default concurrent request processing limit of 100 x CPU count. You can change this on the OwinHttpListener by calling SetPumpLimits(maxAccepts, maxPending).
You can get to the OwinHttpListener instance at IAppBuilders.Properties["Microsoft.Owin.Host.HttpListener.OwinHttpListener"] durring your startup config.
Marked as answer by datikos1 on Jan 29, 2013 09:26 AM
datikos1
Member
2 Points
3 Posts
PersistentConnection connection limit 800
Jan 25, 2013 09:36 PM|LINK
I have a simple self hosted server. when connections reached 800, server does not accepting more connections.
ServicePointManager.DefaultConnectionLimit = Int32.MaxValue; string url = "http://localhost:8080"; using (Microsoft.Owin.Hosting.WebApplication.Start<Startup>(url)) { Console.WriteLine("Server running on {0}", url); Console.ReadLine(); }error is: An existing connection was forcibly closed by the remote host
how to increase connection limit?
DamianEdward...
Member
234 Points
37 Posts
Microsoft
Re: PersistentConnection connection limit 800
Jan 28, 2013 05:59 PM|LINK
This doesn't appear to be a SignalR question per se. Am I missing something?
Senior Program Manager, ASP.NET
Microsoft
datikos1
Member
2 Points
3 Posts
Re: PersistentConnection connection limit 800
Jan 28, 2013 08:41 PM|LINK
Damian,
self hosting example, I found out in signalr documentation using Owin. is any way to host it without Owin? how i can configure Owin to accept more connections?
Tratcher
Member
24 Points
2 Posts
Re: PersistentConnection connection limit 800
Jan 28, 2013 09:50 PM|LINK
Microsoft.Owin.Host.HttpListener (and Microsoft.Owin.Host.HttpSys) has a default concurrent request processing limit of 100 x CPU count. You can change this on the OwinHttpListener by calling SetPumpLimits(maxAccepts, maxPending).
You can get to the OwinHttpListener instance at IAppBuilders.Properties["Microsoft.Owin.Host.HttpListener.OwinHttpListener"] durring your startup config.
Tratcher
Member
24 Points
2 Posts
Re: PersistentConnection connection limit 800
Jan 28, 2013 10:35 PM|LINK
More context based on this selfhost sample: https://github.com/SignalR/SignalR/wiki/Self-host
class Startup { public void Configuration(IAppBuilder app) { OwinHttpListener listener = (OwinHttpListener)app.Properties[typeof(OwinHttpListener).Name]; listener.SetPumpLimits(maxAccepts, maxPending); app.MapHubs(); } }FYI: OwinHttpListener is just now being stabalized, and there are some known issues in the message pump that have been fixed.
datikos1
Member
2 Points
3 Posts
Re: PersistentConnection connection limit 800
Jan 29, 2013 09:29 AM|LINK
thank you Tratcher.
I lost a lot of time to overcome it.