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

Bryan Duxbury commented on THRIFT-970:
--------------------------------------

I think that sounds like a good solution. The javadoc for the class should 
contain at least an inkling (or better yet, a link) to information on how to 
use it performantly.

> 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.

Reply via email to