kohlschutter / junixsocket

Unix Domain Sockets in Java 7 and newer (AF_UNIX), AF_TIPC, AF_VSOCK, and more
Apache License 2.0
433 stars 114 forks source link

Server error "too many files open" #107

Closed 2296894808 closed 2 years ago

2296894808 commented 2 years ago

Describe the bug The server side reports ”too many files open“ error

To Reproduce Steps to reproduce the behavior:

  1. Write UDS server
  2. The client sends a request to the server in a loop
  3. The server will report an error when it receives enough requests. My mac machine reports an error when it reaches more than 10,000 requests

Expected behavior server has no error

Output/Screenshots image

Environment (please complete the following information):

Notes http://t.csdn.cn/mWTRq

kohlschuetter commented 2 years ago

Please provide some code to reproduce your issue. Does this still reproduce with junixsocket 2.5.0?

2296894808 commented 2 years ago

Thank you very much for your reply, I tried 2.5.0 and no longer have this problem. I saw in the 2.5.0 version change log that the file descriptor leak problem was fixed. At the same time, I also posted the code I tested to CSDN.