org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body

Hello All, Account aggregation task is giving below error to one of the target application that configured with web service connector.
org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 417,745; received: 360,448)
Target application team says that there is no error on their side and asked IIQ timeout setting.
In the IIQ application configuration Request Timeout is empty.
Please help to fix this issue.

Hi @jespaancy

This error occurs when the Content-Length header value is not matching with the size of the response. Chances are there it might because the connection is closed before receiving the entire content. Please verify the content using Postman before trying in IIQ. To increase the Request Timeout value, check the time taken by the request in Postman and enter a value greater than that in IIQ and the value should be in seconds. I would also suggest trying pagination which can reduce the data size with response and prevent request time-outs.

2 Likes

Hi Jarin,
Thanks for your response. We have already configured pagination. We cannot install postman in PRD environment because of the company policy.
This error occurs intermittently .Occuring few days in a week only.

Hi @jespaancy,

I would suggest trying to reproduce the issue and try to find a pattern. You can even try printing the response body to see if we are getting the whole response.
The default timeout value is 5 seconds which is from the Apache HttpClient. You can even try increasing the timeout and monitor the issue.

Thanks Jarin. We have found that response time is taking from than 5 sec.So IIQ is closing connection.
Thanks for your help.

1 Like

Hi @jespaancy Would you be so kind to mark Jarins reply as being the solution? So other can see your question has been answered and can find the solution is his post.

Thanks,

– Remold

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.