Reputation: 21
we've hit a problem with the WSO2 callout mediator in ESB 4.5.1.
Assuming a simple proxy like:
<proxy xmlns="http://ws.apache.org/ns/synapse" name="EchoWrapper" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
<target>
<inSequence>
<callout serviceURL="http://[MY_HOSTNAME]:8280/services/echo?wsdl" action="urn:echoInt">
<source xmlns:ns="http://org.apache.synapse/xsd" xpath="$body/*[1]"/>
<target key="calloutBody"/>
</callout>
<property name="RESPONSE" value="true" scope="default" type="STRING"/>
<header name="To" value="http://www.w3.org/2005/08/addressing/anonymous"/>
<log level="full"/>
<send/>
</inSequence>
</target>
<publishWSDL uri="http://[MY_HOSTNAME]/services/echo?wsdl"/>
<description></description>
</proxy>
..if I make a fault happen, i.e. pass a String where an int is expected, I will get one immediate error response, one slow error response, and then the endpoint will become totally inactive, even for valid messages. In the logs, we see:
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) ...
Any ideas?
Upvotes: 0
Views: 779
Reputation: 21
It seems this issue has been reported elsewhere (https://wso2.org/jira/browse/ESBJAVA-922). What happens is that the connections are not cleaned up when an exception is thrown, which in effect means that this version of the callout mediator is effectively useless when it receives faults or timeouts.
Details of how to fix this issue - which I would say is pretty critical - are available in the link above, it's just a matter of adding a line to clean up connections in the catch block.
Upvotes: 1