[ https://issues.apache.org/jira/browse/CXF-7623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16342620#comment-16342620 ]
Antonin Fischer commented on CXF-7623: -------------------------------------- *Fixes* * Fix socket timeout and connection request timeout from AsyncHTTPClient * Fix AsyncHTTPConduit read timeout with exhausted connection pool These changes are important for correct working of read timeout if the pool is busy. The corrections are ok, but it brings incompatible problems with previous timeouts. There is just one problem - the attachment of *RECEIVE* timeout as Request timeout: .setConnectionRequestTimeout((int) csPolicy.getReceiveTimeout()); The receive timeout is alwayss the bigger number and it is not correct to use receive timeout for request timeout which is about waiting to pool. There are two solutions: * Insert the connection timeout instead of receive timeout. This is compromise solution. * Extend the csPolicy domain object for new request timeout and handle the request timeout separately. This is best solution. > AsynchHTTPConduit setupConnection - timeout settings > ---------------------------------------------------- > > Key: CXF-7623 > URL: https://issues.apache.org/jira/browse/CXF-7623 > Project: CXF > Issue Type: Bug > Components: Transports > Reporter: Antonin Fischer > Priority: Minor > Fix For: 3.2.2 > > > Class AsynchHTTPConduit method setupConnection(). Codeblock: > {code:java} > RequestConfig.Builder b = RequestConfig.custom() > .setConnectTimeout((int) csPolicy.getConnectionTimeout()) > .setSocketTimeout((int) csPolicy.getReceiveTimeout()) > .setConnectionRequestTimeout((int) > csPolicy.getReceiveTimeout()); > {code} > Line *setConnectionRequestTimeout((int) csPolicy.getReceiveTimeout())* > Settings of request timeout with receive timeout is not backward compatible > solution. In addition the receive timeout is in many times to long. Better > way is set the *request timeout by connection timeout* instead of it. It is > still compromis solution. > HTTPClientPolicy object still doesn't contain request timeout. Think about > extension of domain objects about request timeout which is already used in > pools etc. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)