Fleck icon indicating copy to clipboard operation
Fleck copied to clipboard

Too many open files

Open moxgeek opened this issue 5 years ago • 2 comments

my server log throw this exception :

1/27/2020 11:11:19 AM [Info] Listener socket restarting 
1/27/2020 11:11:19 AM [Info] Server started at wss://0.0.0.0:8181 (actual port 8181) 
1/27/2020 11:11:19 AM [Info] Listener socket restarted 
1/27/2020 11:11:20 AM [Error] Listener socket is closed System.AggregateException: One or more errors occurred. (Too many open files) ---> System.Net.Sockets.SocketException: Too many open files
  at System.Net.Sockets.SocketAsyncResult.CheckIfThrowDelayedException () [0x00014] in <2703bbaa0a6e4686b6033c2dddb1a363>:0 
  at System.Net.Sockets.Socket.EndAccept (System.Byte[]& buffer, System.Int32& bytesTransferred, System.IAsyncResult asyncResult) [0x0002c] in <2703bbaa0a6e4686b6033c2dddb1a363>:0 
  at System.Net.Sockets.Socket.EndAccept (System.IAsyncResult asyncResult) [0x00000] in <2703bbaa0a6e4686b6033c2dddb1a363>:0 
  at Fleck.SocketWrapper+<>c__DisplayClass25_0.<Accept>b__0 (System.IAsyncResult r) [0x0001a] in <a67c2a4ea08e45378c68140f7d0916f5>:0 
  at System.Threading.Tasks.TaskFactory`1[TResult].FromAsyncCoreLogic (System.IAsyncResult iar, System.Func`2[T,TResult] endFunction, System.Action`1[T] endAction, System.Threading.Tasks.Task`1[TResult] promise, System.Boolean requiresSynchronization) [0x0000f] in <285579f54af44a2ca048dad6be20e190>:0 
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.Net.Sockets.SocketException (0x80004005): Too many open files
  at System.Net.Sockets.SocketAsyncResult.CheckIfThrowDelayedException () [0x00014] in <2703bbaa0a6e4686b6033c2dddb1a363>:0 
  at System.Net.Sockets.Socket.EndAccept (System.Byte[]& buffer, System.Int32& bytesTransferred, System.IAsyncResult asyncResult) [0x0002c] in <2703bbaa0a6e4686b6033c2dddb1a363>:0 
  at System.Net.Sockets.Socket.EndAccept (System.IAsyncResult asyncResult) [0x00000] in <2703bbaa0a6e4686b6033c2dddb1a363>:0 
  at Fleck.SocketWrapper+<>c__DisplayClass25_0.<Accept>b__0 (System.IAsyncResult r) [0x0001a] in <a67c2a4ea08e45378c68140f7d0916f5>:0 
  at System.Threading.Tasks.TaskFactory`1[TResult].FromAsyncCoreLogic (System.IAsyncResult iar, System.Func`2[T,TResult] endFunction, System.Action`1[T] endAction, System.Threading.Tasks.Task`1[TResult] promise, System.Boolean requiresSynchronization) [0x0000f] in <285579f54af44a2ca048dad6be20e190>:0 <---

1/27/2020 11:11:20 AM [Info] Listener socket restarting 
1/27/2020 11:11:20 AM [Info] Server started at wss://0.0.0.0:8181 (actual port 8181) 
1/27/2020 11:11:20 AM [Info] Listener socket restarted 
1/27/2020 11:11:21 AM [Error] Listener socket is closed System.AggregateException: One or more errors occurred. (Too many open files) ---> System.Net.Sockets.SocketException: Too many open files
  at System.Net.Sockets.SocketAsyncResult.CheckIfThrowDelayedException () [0x00014] in <2703bbaa0a6e4686b6033c2dddb1a363>:0 
  at System.Net.Sockets.Socket.EndAccept (System.Byte[]& buffer, System.Int32& bytesTransferred, System.IAsyncResult asyncResult) [0x0002c] in <2703bbaa0a6e4686b6033c2dddb1a363>:0 
  at System.Net.Sockets.Socket.EndAccept (System.IAsyncResult asyncResult) [0x00000] in <2703bbaa0a6e4686b6033c2dddb1a363>:0 
  at Fleck.SocketWrapper+<>c__DisplayClass25_0.<Accept>b__0 (System.IAsyncResult r) [0x0001a] in <a67c2a4ea08e45378c68140f7d0916f5>:0 
  at System.Threading.Tasks.TaskFactory`1[TResult].FromAsyncCoreLogic (System.IAsyncResult iar, System.Func`2[T,TResult] endFunction, System.Action`1[T] endAction, System.Threading.Tasks.Task`1[TResult] promise, System.Boolean requiresSynchronization) [0x0000f] in <285579f54af44a2ca048dad6be20e190>:0 
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.Net.Sockets.SocketException (0x80004005): Too many open files
  at System.Net.Sockets.SocketAsyncResult.CheckIfThrowDelayedException () [0x00014] in <2703bbaa0a6e4686b6033c2dddb1a363>:0 
  at System.Net.Sockets.Socket.EndAccept (System.Byte[]& buffer, System.Int32& bytesTransferred, System.IAsyncResult asyncResult) [0x0002c] in <2703bbaa0a6e4686b6033c2dddb1a363>:0 
  at System.Net.Sockets.Socket.EndAccept (System.IAsyncResult asyncResult) [0x00000] in <2703bbaa0a6e4686b6033c2dddb1a363>:0 
  at Fleck.SocketWrapper+<>c__DisplayClass25_0.<Accept>b__0 (System.IAsyncResult r) [0x0001a] in <a67c2a4ea08e45378c68140f7d0916f5>:0 
  at System.Threading.Tasks.TaskFactory`1[TResult].FromAsyncCoreLogic (System.IAsyncResult iar, System.Func`2[T,TResult] endFunction, System.Action`1[T] endAction, System.Threading.Tasks.Task`1[TResult] promise, System.Boolean requiresSynchronization) [0x0000f] in <285579f54af44a2ca048dad6be20e190>:0 <---

the server do a restarting none stop

i see the System.Net.Sockets.SocketException (0x80004005): Too many open files log, in my knowledge, its related of how many client is connected and how many opend file can be in the system but this is the test server , and there is only 5 clients.

so i was thinking that the problem maybe the server doesn't disconnect the old clients after a timeout, i test that with the following process: i connect a client via ws (or wss ) after that , i manage to disconnect the client without sending the goodbye , (Ctrl+C). i waited to see if the client will disconnect , and that dosent happen . any help ?

moxgeek avatar Jan 27 '20 10:01 moxgeek

Always the same issue ... Any help?

moxgeek avatar Jul 25 '20 07:07 moxgeek

it's more than one year that I'm having these issues and no one answered ...

moxgeek avatar Oct 06 '20 10:10 moxgeek