We have a web application with java8+Springboot+Spring Integration. We are using the DirectChannels for message transfers within our application. There are two inboundadapter to this application a-SOAP web service b- MQ, Also we have outbound adapter calls to two applications :
- For auditing we have another application which we call via Rest api.
- The request recieved by our application is sent to x application these are rest calls.
For x application we are doing httpConnection pooling and we have defaultMaxPerRoute value as 100 and maxTotal value as 200.
Problem :
we are doing a load test of our application using 60 users for around 30 mins. intially the application is processing the message really quickly. The request is within application for max 1sec before it makes the call to x application above.
However what we are observing is that after some point the app becomes really slow even simple method execution for a particular request is taking around 2 seconds and the request remains in the application for around 10-15 seconds which is hampering the performance of the application. This is observed for all requests not specific to any type or api.
We are not able to understand what is causing this slowness. We have added multiple loggers into our application but still not getting any clue. We even checked applciation logs there is no Out of memory error or there is no CPU getting fully utilized.
It will be great if anyone can share some input on what could be wrong or what else should we check.
Below is the logs statement for one of the request which is taking time. I have added loggers at the start and end of each channel. It is evident that even when passing the request from one channel to another it is taking around 2 seconds. Also a simple transformer is taking 2 seconds. So I am not able to identify the root cause for this.
channel 1
2022-11-22 09:24:51 Transformer [INFO] converted the Source object to String xml for message
2022-11-22 09:24:54 AuditService [DEBUG] Completed first channel for :
channel 2
2022-11-22 09:24:56 AuditService[DEBUG] Creating entry audit for operation
2022-11-22 09:24:59 AuditService [DEBUG] log just before pre rest channel call
channel 3
2022-11-22 09:25:02 AuditService [DEBUG] starting rest pre channel
2022-11-22 09:25:05 RequestTransformer [DEBUG] About to process request
2022-11-22 09:25:05 RequestTransformer [DEBUG] The json after conversion
channel 4
2022-11-22 09:25:07 AuditService [DEBUG] Completed request sent audit for operation
2022-11-22 09:25:08 AuditService[DEBUG] Completed request sent audit for operation