In our application(Struts), we make requests to a backend through the API provided the vendor of the backend. But unfortunately ,in case there is issue with process taking longer it has to timeout which the API is not delivering.
I would like to handle the timeouts with a wrapper over the API, can you provide inputs like the viability, approach,etc
Currently the timeouts are not happening when we send across a request to the backend engine.
What we want is that if a request is fired to the backend and it doesnt get any response within 2 secs, it shoudl timeout and doesnt wait for eternity.
We had a recent issue where there was a high CPU util on the backend and the requests from the webapp were waiting indefinitely and utilmately there were hung threads...leading to the server being unresponsive.