We encountered some strange problem on one of the client servers where Java encounters "Too many files",
Checking the descriptors via lsof gives a large list of descriptors "sock" with "unable to determine the protocol."
I suspect this is due to sockets that opened too much time, but since there are a lot of them in our stream dump, I donβt know who the culprit is.
Is there any good way to determine which streams open these sockets exactly?
Thank.
Not the threads themselves.
- . , . (@SyBer , YourKit ... . .)
ulimit . " " .
ulimit
, "grepping" , , . , , try/finally, , .
netstat -ano | grep $YOUR_PROCESS_ID - unix
netstat -ano | grep $YOUR_PROCESS_ID
netstat -ano | find "$YOUR_PROCESS_ID" -
netstat -ano | find "$YOUR_PROCESS_ID"
, , .
ulimit ? , , , .
"" , . .
Valgrind , --track-fds=yes. Valgrind "" , . , , pthread_self (I ' m sure, !) gdb.
--track-fds=yes
pthread_self
, close() , . , .
close()
Source: https://habr.com/ru/post/1775170/More articles:Need help defining an infinite loop - cStatic_cast compiler error in C ++ sdi application - c ++How to get the current canvas bitmap? - javaHow to set a boolean in an array object in plist - plistExternal font does not load in Android 2.1 - androidProblems with caching using NSURLConnection and HTTP header requests - objective-ccolumns with detail - pdflatexIn django, how can I get the value from db to a custom field template? - pythonC # MSSQL alter table, then change the values ββ- c #Creating a twitter monetizer - c #All Articles