[ https://issues.apache.org/jira/browse/THRIFT-2789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14225628#comment-14225628 ]
Qiao Mu commented on THRIFT-2789: --------------------------------- I may have the same issue here. I had a running TNonblockingServer of pid 106129 listening to port 3643. After all clients killed, what I found was: $:/proc/106129/fd# ls -l|wc -l 59310 $:/proc/106129/fd# netstat -an|grep 3643|wc -l 136 It's hard to produce under light load. And once I encounter this, I have to restart the server to solve the problem. If you need more information, please tell me. > TNonblockingServer leaks socket FD's under load > ----------------------------------------------- > > Key: THRIFT-2789 > URL: https://issues.apache.org/jira/browse/THRIFT-2789 > Project: Thrift > Issue Type: Bug > Components: C++ - Library > Reporter: Sergey > Attachments: D10015.diff > > > I checked 0.9.2 and 1.0, but code didn't seem to change in 1.2 either. > Problem is that network threads and worker threads use non-blocking socket > (pipe) to communicate. Under heavy load writes to that pipe might fail with > EAGAIN. While 'notifyIOThread' method carefully checks for the error and > communicates the result via return value, not all callers check result of > 'notify'. > Generally it's hard to tell what appropriate handling of such a failure would > be, but it's clear sockets shouldn't leak. Please use attached patch for the > reference, but I do not insist what I did there is the best way to fix the > problem. -- This message was sent by Atlassian JIRA (v6.3.4#6332)