2024-01-01

Receive Side Scaling issues with SQL Server

Last month the application team asked me to take a look on an error raised from their PowerShell script, which calls BCP to import large chunks of data from CSV files into SQL Server. Error messages got by powershell:

SQLState = 08S01, NativeError = 10054
Error = [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: An existing connection was forcibly closed by the remote host.

SQLState = 08S01, NativeError = 10054
Error = [Microsoft][ODBC Driver 17 for SQL Server]Communication link failure
SQLState = 08S01, NativeError = 0

In sql server error log, error messages:

Error: 4014, Severity: 20, State: 3.

A fatal error occurred while reading the input stream from the network. The session will be terminated (input error: 0, output error: 0).

I did some googling, got some suggestions to try disabling TCP Chimney Offload and Receive Side Scaling. Below are the procedures:

1. Open Administrator: Command Prompt, run netsh int tcp show global to check the current settings.

 

As you see above, Receive-Side Scaling State and Chimney Offload State are enabled.

2. Run below commands to disable TCP Chimney and Receive Side Scaling:

  • netsh int tcp set global chimney=disabled
  • netsh int tcp set global rss=disabled

3. Run netsh int tcp show global again to check the new settings.

4.  Expand Network adapters, right-click the network adapter, and then click Properties.
On the Advanced tab in the network adapter properties, locate the settings for TCP Chimney Offload and Receive-side scaling, set them to disabled. Different network adapter manufacturers may use different terms to describe the network settings on the Advanced properties page of the network adapter.

Reference: Disable TCP offloading and RSS settings

No comments:

Post a Comment