Slow response with WSO2 enterprise integration using SOAP UI request - wso2

Whenever we invoke the SOAP UI call for add payment api, after an extended period, the 1st call takes >27 seconds (response taking this much time). Subsequent calls, get over in ~5-7 seconds. This issue persists in all lower environments (DEV, QA and UAT)
WSO2 EI Server: 6.6.0
DB: MS SQL Server 12.0
Message Broker: Rabbit MQ
How can we get the response in a faster way?

Related

Why does my WSO2 EI (ESB) proxy service hang for 3 minutes?

I have a BPS process that rapidly performs a lot of calls to an ESB proxy. The ESB proxy calls an ESB API, which calls the API of our own product.
Often, the BPS process pauses for exactly 3 minutes while waiting for a response from the ESB. After the 3 minutes, everything continues as if nothing happened. Using Wireshark and some additional Log mediators, I have discovered the following:
The hanging occurs in the ESB proxy, right before the out sequence.
According to Wireshark, the ESB API has already sent its response to the ESB proxy when the hanging occurs.
The fact that this hanging takes exactly 3 minutes should be a hint. I searched the config files for anything specifying 180 seconds, but the only ones are the http socket timeouts and the http transportReceiver's threadKeepAliveTime. If I reduce those, the BPS throws a p2p communication error instead of continuing. To me, this indicates that something somewhere in the background is still causing a 3 minute delay for some calls.
By the way, the hanging does not occur for some specific calls only. I have been testing several times, performing the exact same calls each time, and I cannot predict which call will hang or even if any call will hang at all.
I would suggest you add at least a <send /> mediator in your faultSequence.
Perhaps also add a simple makefault mediator (don't make it too complex just yet - just a static error response will do - at this stage you don't want faults originating within the faultSequence)
I suspect some error from the backend service or in the out sequence or maybe even faultSequence is not being handled - which means instead of sending a response back to your caller, the proxy hangs until time out instead
PS: It really helps if you post the source code of your proxy too
I had the same experience sometimes ago when I tried to call PUT or POST methods without a request body. But, by default, WSO2 ESB expects a message body to send the request to backend server when the http method is POST or PUT.
I had to either send the request with a request body (at least an empty JSON: {}) or use the property FORCE_POST_PUT_NOBODY in your APIs.
Read this post for more details on how to use FORCE_POST_PUT_NOBODY property.
If you enable the wire log in WSO2 you will realize NGIX is using HTTP 1.0 client in the request.
In order to fix that change your NGINX mapping to use "proxy_http_version 1.1;" and the problem will be sorted.
Cheers.
I ended up getting WSO2 support involved in this. Apparently, I was hitting some very rare edge case which was very hard for the WSO2 engineers to reproduce.
In the end, the fix turned out to be adding the following property just before the send mediator in the proxy service:
<property name="NO_KEEPALIVE" value="true" scope="axis2"/>

Can WSO2 MB handle HTTP requests?

I've been working with WSO2 Message Broker in order to publish and consume messages through jms and other clients. I've gone through the official documentation including the samples.
What I want to know is that, is it possible for WSO2 MB to handle http requests directly instead of jms. Yes you can do something like this, by converting http to jms through WSO2 ESB which seems like a long process.
ie: I mean having http as the end point or the transport to publish and consume messages directly in WSO2 Message Broker.
In order to achieve this, you will have to use ESB + MB set up as explained at [1]. What you can do is to use ESB to wrap JMS functionality using a HTTP client. It is recommended to use ESB externally in a separate JVM when using this setup.
[1] http://wso2.com/library/articles/2013/03/configuring-wso2-esb-wso2-message-broker/
Regards,
Pubudu.

Sending large payloads via WSO2 ESB

I'm trying to do some load testing on the WSO2 ESB, and I have a SOAP message with a large payload that I'd like to send (10+MB, sometimes reaching 50 inbound, and sometimes even 300 outbound).
I'm using curl to send the messages, first to the backend SOPAUI service. This goes through fine. However when I send the message via a proxy service on the ESB, curl fails to finish uploading the file, and gets slower and slower as the upload progresses. The logs from the ESB do not seem to be reporting anything useful.
I have set the timeout on this to 20 minutes, and it still does not complete. Turning on MTOM has no effect, and I am using a simple passthrough proxy. The proxy service functions fine with small message sizes.
What else can I look into to get this working? If it is indeed possible.
You could try to configure Message Relay
in repository/conf/axis2.xml, you configure :
org.wso2.carbon.relay.BinaryRelayBuilder as the messageBuilder's class associated with your contentType (text/xml for exemple if soap11 of application/soap+xml with soap12)
org.wso2.carbon.relay.ExpandingMessageFormatter as the messageFormatter's class
Have a look there : https://docs.wso2.com/display/ESB481/Message+Relay
Turned out I had to switch to using the NHTTP transport rather than the Passthrough transport, thanks to this question here for prompting looking into this: WSO2 ESB unknown error code 102511
Requires an edit in carbon.xml, detailed in the accepted answer from the link above.

net.sf.saxon.om.NamePool$NamePoolLimitException

I am calling the third party web service using the SOAP request in my java application. SOAP request is having 2000 patient records to get their updates. While calling to the web service I am getting runtime uncaught exception net.sf.saxon.om.NamePool$NamePoolLimitException: NamePool limit exceeded: max 1023 prefixes per URI. An internal error occurred in the ESB. I want to know 1. Is this client side issue or server side. 2. If this is client side issue how to resolve this problem. Please suggest ASAP as I am facing this issue in my production environment.Thanks

Send SOAP service reponse without client requst in Axis2

I want to send response(I am getting the data from my DB) continuously every 5 minutes without any request from client by using SOAP and Axis2. I have created the SOAP server by using following link. http://www.eclipse.org/webtools/community/tutorials/TopDownAxis2WebService/td_tutorial.html
But I don't know how to response continuously from server. Please help me.
A webservice cannot send a response without being called because it won't know where to send the data nor what function is being invoked (a ws could have many functions).
The idea of a WS is to offer a service to everyone who can access it, so the response destinies are multiple.
If you want to get the data from your DB every 5 minutes, your client will have to call the WS every 5 minutes or less (take into account the server processing time).