Question / Problem:
When processing very large files in Kofax TotalAgility (KTA) that are 1 - 2 GB in size the following error is encountered and the process fails.
"Unable to read data from the transport connection. An existing connection was forcibly closed by the remote host.
The underlying connection was closed. An unexpected error occurred on a receive."
Is there a fix for this error?
Answer / Solution:
This error and behavior has been replicated by internal KTA Support Teams and it was determined that the reason why this error occurs is because the HTTP response max size limit has been exceeded. This limit is 2 GB, which is also the limit of the file size stored in SQL Server. This issue can occur when processing a file that is less than 2 GB in size because this limit gets exceeded based on how WCF manages its memory.
Here is the exception text:
<ExceptionType>System.InsufficientMemoryException, mscorlib, Version=22.214.171.124, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
<Message>Failed to allocate a managed memory buffer of 2147483647 bytes. The amount of available memory may be low.</Message>
The following enhancement request was submitted to have the documentation amended to include information explaining these limitations.
Enhancement Request 1380904: ER - Documentation Enhancement To Include Information About File Size Limits In KTA
It should also be noted that supporting large files is a known issue within KTA, and so there are enhancements already in the Products road map for future versions to address.