KB Article #193820
PeSIT Large File Transfer Fails with TCP Reset Due to Buffered Data After Connection Close
Problem
Large file transfers may fail with a TCP reset (RST) near the end of the transfer, although the PeSIT session is established successfully and all protocol phases complete without errors (PI_2 = 0).
This occurs when a large Maximum Buffer Size (PI_25), for example 32700, is negotiated.
With large PI_25 values:
• Data is sent in large chunks
• More data remains buffered at the TCP/TLS level
• At the end of the transfer, data may still be in transit
A network capture shows the following sequence:
1. Server sends TCP FIN (start of connection close) 2. Client continues sending data 3. Server receives data after FIN 4. Server sends TCP RST
This behavior results in connection termination and transfer failure.
Resolution
Reduce the Maximum Buffer Size (PI_25) in the PeSIT TransferSite used for the connection to limit data burst size.
This ensures that SecureTransport proposes a lower PI_25 value during negotiation, as the effective buffer size is determined between both peers.
Recommended value:
• PI_25 = 4096
This results in:
• Smaller data chunks
• Reduced buffering
• No data sent after FIN
• Clean TCP connection closure
After reducing PI_25, large file transfers should complete successfully.