[ 
https://issues.apache.org/jira/browse/THRIFT-4431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16297036#comment-16297036
 ] 

ASF GitHub Bot commented on THRIFT-4431:
----------------------------------------

GitHub user lompy opened a pull request:

    https://github.com/apache/thrift/pull/1447

    THRIFT-4431 Ruby library: Finish http connection after flush in http client

    Call Net/HTTP#finish after flush in HTTPClientTransport to release 
connection file descriptors.
    This eliminates error "Errno::EMFILE: Failed to open TCP connection (Too 
many open files - getaddrinfo)" if many calls are made with a client object.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/lompy/thrift patch-1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/1447.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1447
    
----
commit 1ec9e834c30dd5be2b620f87ef00b6523e40626d
Author: Roman Charushin <[email protected]>
Date:   2017-12-19T16:03:41Z

    Finish http connection after flush in http client
    
    Call Net/HTTP#finish after flush in HTTPClientTransport to release 
connection file descriptors.
    This eliminates error "Errno::EMFILE: Failed to open TCP connection (Too 
many open files - getaddrinfo)" if many calls are made with a single client 
object.

----


> Repetitive use of HTTPClientTransport causes "Errno::EMFILE: Failed to open 
> TCP connection"
> -------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-4431
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4431
>             Project: Thrift
>          Issue Type: Bug
>          Components: Ruby - Library
>    Affects Versions: 0.10.0, 0.11.0
>            Reporter: Roman Charushin
>             Fix For: 0.10.0, 0.11.0
>
>
> Repetitive calls to the clients initiated with the HTTPClientTransport causes 
> "Errno::EMFILE: Failed to open TCP connection" error due to too many open 
> files. And the reason is that each time client is called new http connection 
> is created at each flush and is never finished after, holding the file 
> descriptors to tcp connection files.
> In order to solve this HTTP#finish should be called in ensure block of 
> HTTPClientTransport#flush.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to