I have an instance of SQL Server 2016 (13.0.4451) which I can reliably connect to over shared memory (
lpc:(local)\instance). If instead I try to connect to
127.0.0.1,1433 I experience low (~1/1000) failure rates with the error message:
Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=3; handshake=14995;
What would affect the loopback connection, but not the shared memory connection?
Related, but far more broad: Connection Timeout Expired without apparent network issue