0
votes

We have wso2esb-5.0.0 and we can see that intermittently the server gets high CPU usage and starts to increase gradually and then makes the API run slow and finally stops to respond back, in order make it work we restart the ESB servers which will come back to the normal working state. Could anyone please let me know what could be the issue?

Do we have any limitation that ESB can handle only x-number of API calls/sec and can have only x-number of open connection/sec? Any inputs and suggestion would be helpful.!

Configuration -

We have 2 ESB & 2 MB running on a cluster mode. The issue is seen in both the ESB's. ESB - 16GB RAM, cache 8GB

We can see the ESTABLISHED connection value varying from 100 to 500 based on the numbers of incoming requests.

enter image description here

Thanks

1

1 Answers

0
votes

There are limitations to the number of requests that can be handled by the ESB server. This depends on a number of factors such as backend latency, mediation implementations, request paylods, etc.

For example, consider a scenario where you use a mediator such as a script mediator to process a large payload (which is not recommended). In this scenario, the transformation may take a considerable amount of time resulting in threads blocked at the script mediator. By default, the passthrough message processor thread pool is defined as 500. Thus it can result in a scenario where there are no threads to process new requests resulting in a delay for the responses and in the worst case an out of memory scenario.

Therefore with the available information, we are unable to determine the exact cause of the issue. But from the above description, we can suspect that there is an issue with the available threads (due to the slow response). You can capture thread dumps and thread usage in your environment and analyze the possible cause of the issue. Please refer to the documentation [1], [2] to identify how you can capture a thread dump and a thread usage. Please refer to [3] to clarify the thread usage analysis.

Also, capture and analyze a heap dump in your environment.

[1]-https://docs.wso2.com/display/CLUSTER420/Troubleshooting+in+Production+Environments [2]-https://gist.github.com/bsenduran/02e8bf024fcaaa7707a6bb2321e097a8 [3]-https://medium.com/@prabushi/analyse-thread-dump-with-process-instructions-c5490b97e2d1