My guess is it is a bug related to RDMA as when I was having the issue I saw the following error every time the disconnect would happen in the windows smbclient event log:
A network connection was disconnected.
Frequent, unexpected disconnects when using an RDMA over Converged Ethernet (RoCE) adapter may indicate a network misconfiguration.
This event corresponded time wise with the following event in the Truenas /var/log/samba4/log.smbd:
ixnas_get_native_dosmode: rsync/filename: open() failed: Interrupted system call
So short answer is I don’t think there is a configuration based fix we can do at this time. Hopefully someone at IXSystems will tell me I am wrong.