You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by "Jun (JIRA)" <ji...@apache.org> on 2010/08/17 03:55:19 UTC

[jira] Commented: (AXIS2-4797) org.apache.commons.httpclient.ConnectionPoolTimeoutException: Timeout waiting for connection after several times of web services call with axis2-xmlbeans

    [ https://issues.apache.org/jira/browse/AXIS2-4797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899236#action_12899236 ] 

Jun commented on AXIS2-4797:
----------------------------

As I search around on the internet, I just found that there are many similar concerns,  See the following page 

http://www.listware.net/201005/axis-java-user/107248-axis2-151-jax-ws-client-connection-tuning-best-practices-connection-timeouts.html,  I am afraid if I am wrong using the axis api. Appreciate it if anyone can give some suggestions.

Home - apache - axis-java-user - 201005 - Thread
Axis2 (1.5.1): JAX-WS Client connection tuning, best practices, Connection timeouts
by Doug Bon 2010-05-28T05:14:50+00:00

    * Previous thread: wsdl address location when using ssl
    * Next thread: Axis2 SOAP message isn't formatted.
    * Threads sorted by date: axis-java-user 201005

We're using Axis as a JAX-WS implementation (under WebSphere 6.1, if
that matters), so we're not writing any Axis-specific code ourselves.
On Axis2 1.4, we observed many sockets being opened and staying open
long after use and we had some kind of problem that led us to this
ticket https://issues.apache.org/jira/browse/AXIS2-4330 and upgrading
to 1.5.1.
As part of that change, we also modified our code to use a singleton
javax.xml.ws.Service and only call its get...PortTypeEP() (which calls
Service.getPort()) on each request.
Doing this, we now no longer see socket growth, but after a small
number of requests, we receive this error:
org.apache.commons.httpclient.ConnectionPoolTimeoutException: Timeout
waiting for connection
Now, this thread seems relevant:
http://www.mail-archive.com/axis-user@ws.apache.org/msg49949.html
But, since we're using JAX-WS code, not our own, we don't have the
ability to make Axis-specific configuration calls for such things. Can
I do this in axis2.xml? If so, where do I need to place it for a
client deployment?
Furthermore, I'm not sure which kinds of settings actually address the
problem without removing the whole benefit of reused sockets. For
instance, if I'm able to use settings like these, described in that
thread:
ConfigurationContext context this.client.getServiceContext().getConfigurationContext();
context.setProperty(HTTPConstants.REUSE-HTTP-CLIENT, true);
context.setProperty(HTTPConstants.CACHED-HTTP-CLIENT,
this.httpClient);
context.setProperty(HTTPConstants.AUTO-RELEASE-CONNECTION, true);
Am I any better off than simply creating new Service instances and the
new sockets with them?
Am I totally misunderstanding how to use the library properly? Or is
the JAX-WS implementation flawed by not cleaning up after itself? I
certainly wouldn't have expected a shared Service instance to exhibit
this limit of 2 sockets with its default settings.
Thanks for any assistance.
Doug

> org.apache.commons.httpclient.ConnectionPoolTimeoutException: Timeout waiting for connection after several times of web services call with axis2-xmlbeans
> ---------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4797
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4797
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api, codegen
>    Affects Versions: 1.5.1
>         Environment: Windows XP SP3,  axis 2 1.5.1, XMLBeans, JDK 1.5.0_22,  Tomcat  5.5.17
>            Reporter: Jun
>
> I am using the WSDL2Java  auto generated stub classess
> ServiceClient Options:
>     options.setManageSession(true);
>     options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,true);
> Web Services request fail due to the following expection.  
> org.apache.commons.httpclient.ConnectionPoolTimeoutException: Timeout waiting for connection
> 	at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.doGetConnection(MultiThreadedHttpConnectionManager.java:497)
> 	at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.getConnectionWithTimeout(MultiThreadedHttpConnectionManager.java:416)
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:153)
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
> 	at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
> 	at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
> 	at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:400)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)
> 	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
> 	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
> 	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org