If the user program does not properly disposes socket with Socket.Close, the exception "too many open files" can occur in Socket.Disconnect method, what is strange because this method does not allocate new socket.
ab -c 30 -n 10000 http://localhost:9001/
Sometimes exception can occurs in Socket.EndAccept method, what is expected behaviour, but in most cases you'll catch it in Socket.Disconnect.
Information about test case. This testcase emulates web-server. For each opened connection it sends "Hello, world!" http response. All the thing is done in NetworkConnector.Disconnect method https://github.com/xplicit/HttpTestServer/blob/master/NetworkConnector.cs#L327
Mono JIT compiler version 3.4.1 (master/5ed69a0 Wed May 28 06:31:59 NOVT 2014)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
LLVM: supported, not enabled.
Closing ancient bugs, please reopen if you're still having this problem.
The problem still exists it's easily reproduced with test-case is mentioned above and mono 4.6.1
Mono JIT compiler version 4.6.1 (Stable 22.214.171.124/ef43c15 Wed Oct 12 09:10:37 UTC 2016)
OS: Ubuntu 16.04