You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Mathias Herberts (JIRA)" <ji...@apache.org> on 2010/11/02 22:15:04 UTC

[jira] Commented: (THRIFT-970) Under heavy load, THttpClient may fail with "too many open files"

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

Mathias Herberts commented on THRIFT-970:
-----------------------------------------

I could merge THttpClient and THttpTransport by having the current THttpClient behavior if a null HttpClient is passed to the constructor, how is that?

> Under heavy load, THttpClient may fail with "too many open files"
> -----------------------------------------------------------------
>
>                 Key: THRIFT-970
>                 URL: https://issues.apache.org/jira/browse/THRIFT-970
>             Project: Thrift
>          Issue Type: Bug
>          Components: Java - Library
>    Affects Versions: 0.2, 0.3, 0.4, 0.5
>         Environment: All
>            Reporter: Mathias Herberts
>         Attachments: THRIFT-970-1
>
>
> THttpClient uses URL.openConnection which returns a HttpUrlConnection instance for each message transmission.
> HttpUrlConnection supposedly pools connections to the server. While stress testing an application, we've noticed that after several thousands requests, THttpClient would fail with a "Too many open files" error thrown in java.net.Socket.createImpl called from THttpClient.flush.
> As the underlying connection to the server is internally handled by HttpUrlConnection and the JVM, there is unfortunately not much that can be done to remedy this problem while still using HttpUrlConnection.
> I propose a new implementation of THttpClient which uses Apache HttpClient from Http Components instead of HttpUrlConnection.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.