Understanding the error “An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.”

This error message, which is associated with the Winsock error WSAENOBUFS and actually comes from Windows rather than SQL Server directly, has two well-understood root causes. However, it still stumps people today, probably because  there is no single source which explains both root causes and offers solutions for both. Here is a description of the two…