When I am making a REST call (POST) from UI and I am always getting a 500 internal server error server.
When I check server, the actual expected action is completed successfully and there were no error logs and the internal server error is been thrown even before completing this action.
One observation here is that webservice is taking around 20 secs to complete the request and I am always getting this error at 11-12 secs. So I suspected the timeouts and added below code with huge timeouts. But still I was facing the same issue
HttpClients.custom().setSSLSocketFactory(SOME_SSL_FACTORY).setDefaultRequestConfig(RequestConfig.custom().setSocketTimeout(300000).setConnectTimeout(500000).build()).build()
One more observation here is that when I deploy my UI and webservice in my local tomcat, I am getting a proper response from webservice. If I deploy both of them in Test env or if I deploy webservice in test env and UI in my local tomcat, I am getting this error.
UI is receiving 500 error even before the action getting completed at server and at server side the action is getting completed successfully after receiving this error in UI. Can some one please help me finding the issue.