SQL Server 2014突然遇到以下报错
A fatal error occurred while reading the input stream from the network. The session will be terminated (input error: 10054, output error: 0). Error: 4014, Severity: 20, State: 11.
网上搜索了一些文章,记录下相关原因及解决方法
一、 问题原因及相关技术
The problem is related to Microsoft’s Scalable Networking Pack (SNP) which consists of these three main features:
- TCP/IP Chimney Offload – helps to transfer the workload away from the CPU to a network adapter during network data transfer. This helps to reduce the processing load on the CPU.
- Receive Side Scaling (RSS) - enabled the network load from a NIC to be distributed across multiple CPUs in a multiprocessor computer.
- Network Direct Memory Access (NetDMA) – provides services for offloading the memory copy operation that is performed by the networking subsystem to a dedicated direct memory access (DMA) engine when receiving network packets.
检查以上功能是否可用
netsh int tcp show global
如果深入研究 NIC 驱动程序设置,我们会发现
二、 解决方法
可以选择在操作系统禁用这些功能
1. Disable TCP/IP Chimney Offload
netsh int tcp set global chimney=disabled
2. Disable RSS
netsh int tcp set global rss=disabled
3. Disable NetDMA
- 禁用NetDMA仅能通过修改注册表实现,修改前建议先备份
- 注册表目录为 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
- 找到EnableTCPA项,如果没有则新建,类型为DWORD
- 将其值改为0并保存
- 该修改需要重启服务器生效,重启完记得执行 netsh int tcp show global 命令检查
参考
https://www.sqlcoffee.com/Troubleshooting004.htm
https://www.sqlserverlogexplorer.com/causes-of-sql-error-4014/
https://www.sqlcoffee.com/Troubleshooting004.htm
https://rabiachrafi.wordpress.com/2016/12/04/fixing-sql-server-fatal-error-4014/
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/gg162709(v=ws.10)?redirectedfrom=MSDN