-
Notifications
You must be signed in to change notification settings - Fork 78
Socket Leak on Linux #28
Comments
Using the new code that you have pushed and using the sample app I linked to and executing this:
The webserver locks up after 5 secs or so. Any ideas? |
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... |
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. |
You have -c 5, so +- 5 difference probably don't mean anything. |
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 😄 |
I've submitted a fix to the 256 listeners with #31 however perf is pretty bad |
Already installing Linux to try myself But you can place this into .config inside element:
And send me Nowin.Core.log Try something minimum what will hang it. |
Aha you found it in mean time. Perfect 👍 |
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? 😄 |
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 :-) |
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: The endpoint is a Nancy endpoint setup to just return "Hi"
|
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 have a related issue #52 |
We've spotted a possible socket leak on linux v3.18.6 and mono 3.12.0
The source for a demo app is at : https://github.com/VQComms/SelfHostWithOwin
To reproduce run:
mono SelfHostWithOwin.exe
ps
Make note of process id
Use curl/wget to hit http://localhost:1999
Run
ls /proc/{PID}/fd -l
Make note of number of socket handles present
Use curl/wget to hit http://localhost:1999 again
Run
ls /proc/{PID}/fd -l
Make note of number of socket handles present and notice it has increased
It appears to increase each socket handler per request
The text was updated successfully, but these errors were encountered: