Exchange 2016 and Outlookanywhere

It sounds like your TCP timeouts might be conflicting between your Exchange server and Firewall device. On Windows the default is 2 hours unless you set it in the registry. So the firewall may be cutting off these TCP sessions after a few minutes and the connections get orphaned. Exchange will only allow you to open so many connections and as a result you would lose connections to other mailboxes first.

You should find out what the TCP timeout is on your firewall and then set the value lower on your Exchange server. Go to the following key:

\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

If the "KeepAliveTime" value isn't already there, add it as a new DWORD value. If it is there, edit it. NB This is measured in milliseconds, eg 1800000 (decimal) = 30 minutes.

You will need to reboot the server after setting the value.

Reference - Checklist for Troubleshooting Performance Related issues in Exchange 2013, 2016 and 2019 (on-prem)