Comments (14)
Using the new code that you have pushed and using the sample app I linked to and executing this:
!/bin/ash
while true; do
curl http://localhost:1999/ -s
done
The webserver locks up after 5 secs or so.
Any ideas?
from nowin.
I ran the ab
load test tool and here's the results. I told it to do 1000 request with 5 concurrent requests, as you see it only managed 254 requests. Very odd.
from nowin.
Does it at least not leak sockets? Don't have idea, but I am afraid that Saea implementation could have more problems than just does socket leak...
By default I create 256 "connection listeners" so if they will not correctly reset and reuse after disconnect. It could do something like this...
from nowin.
The socket leak seems to be fixed so thats a good thing.
Interesting that it gives up after 254 requests and you say you have 256 listeners so I suspect something going on there.
from nowin.
You have -c 5, so +- 5 difference probably don't mean anything.
from nowin.
ok, i'm a bit in the dark regarding this so if you could point us in the right direction it would be greatly appreciated đ
from nowin.
I've submitted a fix to the 256 listeners with #31 however perf is pretty bad
from nowin.
Already installing Linux to try myself
But you can place this into .config inside element:
<system.diagnostics>
<trace autoflush="true" indentsize="0">
</trace>
<sources>
<source name="Nowin.Core">
<listeners>
<remove name="Default"/>
<add name="Nowin.Core" />
</listeners>
</source>
<source name="Nowin.Core.Debug">
<listeners>
<remove name="Default"/>
<add name="Nowin.Core" />
</listeners>
</source>
</sources>
<switches>
<add name="Nowin.Core" value="Verbose" />
<add name="Nowin.Core.Debug" value="Verbose" />
</switches>
<sharedListeners>
<add name="Nowin.Core"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="Nowin.Core.log" />
</sharedListeners>
</system.diagnostics>
And send me Nowin.Core.log
Try something minimum what will hang it.
You can reduce number of connections by calling this on ServerBuilder:
.SetConnectionAllocationStrategy(new ConnectionAllocationStrategy(1, 0, 1, 0))
from nowin.
Aha you found it in mean time. Perfect đ
from nowin.
Perf is still bad though so not sure what we can do to improve that. Do you fancy trying it out on your new Linux install? đ
from nowin.
Now that you solve it I could return to JS UI Framework I am developing. .Net + Linux is not critical right now for me, I am hoping it will be solved by MS till end of this year anyway :-)
Nowin solved for me problem of needing Admin rights to start HttpListener and much easier deployment.
from nowin.
OK cool. I've ran some very basic load test tools comparing latest nowin release and owin.httplistener from MS on Linux and nowin's performance is pretty bad in comparison, it fails to even run so I'm not sure what's going on underneath, its as if it can't take many concurrent connections. If I drop it from 100 to 10 it at least runs the tests but the perf is still bad, even comparing 1 connection vs 2 concurrent connections you notice a big difference
Here's the stats:
https://gist.github.com/jchannon/45c0bbb0e10db56c7ea2
The endpoint is a Nancy endpoint setup to just return "Hi"
public class HomeModule : NancyModule
{
public HomeModule()
{
Get["/"] = _ => "Hi";
}
}
from nowin.
Mono HttpListener does not use Saea (and they probably know why :-)). Mono Socket implementation does not use epool (at least last time I looked) which is critical for speed of 1k+ connections. I don't have time to implement it by native calls for Linux (eventhough it would be interesting). So really hoping than someone will re-implement that completely from scratch. BTW you cannot use Windows implementation on Linux because OS API is completely different (IOCP vs epool). Also for me even higher priority would to use http://stackoverflow.com/questions/18419117/rio-registered-i-o-sockets-in-net in Windows Nowin, but again in this I hope that "cloud optimized" CoreCLR will eventually use that as Saea backend.
I am sorry, I cannot help you much more right now.
from nowin.
I have a related issue #52
from nowin.
Related Issues (20)
- ObjectDisposedException in SaeaLayerCallback.IoCompleted HOT 2
- Force client certificate HOT 5
- Weird hang after pressing f5 repeatedly. HOT 7
- Periodically getting this exception HOT 7
- Deadlock on large request body HOT 3
- Nowin app hangs using certificate for https after the first successful connection HOT 3
- Nowin doesn't (seem) to automatically urldecode the request url HOT 4
- websockets timeout with signalr HOT 7
- Inconsistent WebSocket Upgrade response. HOT 2
- WebSockets: Ping/Pong frames should be handled even if there is no receive
- WebSockets: frames with fragmented header are causing halt in websocket processing HOT 3
- Mechanism to specify keep-alive timeout HOT 1
- ćŻĺŚćć°çćŹć´ć°ďź HOT 3
- SSL + libcurl: connection seems dead
- Nowin implements IOwinRequest.Body.Length incorrectly HOT 1
- corruption/threading issues in transport layer? HOT 3
- Is it possible to provide a background worker sample? HOT 3
- keep-alive never used HOT 1
- ERR_SSL_VERSION_INTERFERENCE with Chrome on android HOT 3
- A recommendation to archive this project
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. đđđ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ď¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nowin.