You seem to be on the right track that the size of the files my be the cause of the issue, only because the transfer of the data seems to be timing out. You read more about a potential the causes/solution here. Here is a summary of the above link.
Errors like these happen because the remote server (to which the call was being made) did not deliver a response to your request and cut the connection before an answer could be sent. Meaning:
Your application (the caller) sent the request
While the application was waiting for the response the remote server cut the connection.
Resolving such a problem cannot be done on the caller side (your application) - you need to work with the party that provides the service for you.
If you are the other party or want to help: common causes on the other side for these errors are:
The request is taking too long to run and the server "times it out". If another OutSystems Platform is on the receiving end (meaning: the web call is to an OutSystems Platform) you may want to look here.
The remote server is having issues. E.g. application pool recycling
or crashes that interrupt logic that may be runnning.
A network layer is cutting the network connection half-way. You may see errors in the remote server similar to this one (e.g. "could not flush response