You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by niteshjain132 <ni...@gmail.com> on 2016/09/06 04:38:13 UTC
Configure Http connection pooling in Apache CXF
I'm using Apache camel 2.16.0 and CXF 3.1.2
How can i configure connection pooling (in cxf.xml) for all the http calls
so that it can reuse the existing http connection instead of create a new
connection every time ?
I see too may TIME_WAIT, CLOSE_WAIT and FIN_WAIT2 for each request, How can
i close idle connections ?
<bean id="http" class="org.apache.camel.component.http.HttpComponent">
<property name="camelContext" ref="camel_context" />
<property name="httpConnectionManager" ref="myHttpConnectionManager"
/>
</bean>
<bean id="myHttpConnectionManager"
class="org.apache.commons.httpclient.MultiThreadedHttpConnectionManager">
<property name="params" ref="myHttpConnectionManagerParams" />
</bean>
<bean id="myHttpConnectionManagerParams"
class="org.apache.commons.httpclient.params.HttpConnectionManagerParams">
<property name="<b>connectionTimeout*" value="20000" />
<property name="<b>soTimeout*" value="20000" />
<property name="<b>defaultMaxConnectionsPerHost*" value="5"
/>
<property name="<b>maxTotalConnections*" value="10" />
</bean>
seems like maxTotalConnections isn't working ! maxTotalConnections is 10 but
when i do a load test i can see more than 230 ESTABLISHED connections.. not
only this all the properties like connectionTimeout, soTimeout,
defaultMaxConnectionsPerHost are all ignored !
any help is appreciated..
--
View this message in context: http://cxf.547215.n5.nabble.com/Configure-Http-connection-pooling-in-Apache-CXF-tp5772288.html
Sent from the cxf-user mailing list archive at Nabble.com.