Tuesday, 9 May 2017

SQL Server 2012 stops responding and a "Non-yielding Scheduler" error is logged

To day we have encounter below issue is on one of the production server. Application team informed quires are running very slow and getting timed out.

DateTime Server       Using 'dbghelp.dll' version '4.0.5'
DateTime Server       ***Unable to get thread context for spid 0
DateTime Server       * *******************************************************************************
DateTime Server       *
DateTime Server       * BEGIN STACK DUMP:
DateTime Server       *   DateTime spid 2632
DateTime Server       *
DateTime Server       * Non-yielding Scheduler
DateTime Server       *
DateTime Server       * *******************************************************************************
DateTime Server       Stack Signature for the dump is 0x0000000000000089
DateTime Server       External dump process return code 0x20000001.
External dump process returned no errors.

DateTime Server       Process 0:0:0 (0x1758) Worker 0x00000000026F8160 appears to be non-yielding on Scheduler 6. Thread creation time: 13138696220624. Approx Thread CPU Used: kernel 46 ms, user 58859 ms. Process Utilization 53%. System Idle 45%. Interval: 70067 ms.
DateTime spid3306     The client was unable to reuse a session with SPID 3306, which had been reset for connection pooling. The failure ID is 46. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this
DateTime Server       Process 0:0:0 (0x2394) Worker 0x0000000C14D92160 appears to be non-yielding on Scheduler 19. Thread creation time: 13138700790021. Approx Thread CPU Used: kernel 15 ms, user 59468 ms. Process Utilization 69%. System Idle 29%. Interval: 71710 ms.
DateTime Server       Process 0:0:0 (0x1a0c) Worker 0x0000000002FBC160 appears to be non-yielding on Scheduler 5. Thread creation time: 13138671632269. Approx Thread CPU Used: kernel 0 ms, user 59750 ms. Process Utilization 53%. System Idle 46%. Interval: 70100 ms.

DateTime spid12s      FlushCache: cleaned up 39261 bufs with 26260 writes in 144713 ms (avoided 478 new dirty bufs) for db 18:0
DateTime spid12s                  average throughput:   2.12 MB/sec, I/O saturation: 6750, context switches 9255
DateTime spid12s                  last target outstanding: 7216, avgWriteLatency 46
DateTime Server       Process 0:0:0 (0x2064) Worker 0x000000078CC92160 appears to be non-yielding on Scheduler 3. Thread creation time: 13138705749665. Approx Thread CPU Used: kernel 0 ms, user 59765 ms. Process Utilization 72%. System Idle 27%. Interval: 73762 ms.

DateTime Server       Process 0:0:0 (0x2914) Worker 0x000000623F030160 appears to be non-yielding on Scheduler 8. Thread creation time: 13138705770340. Approx Thread CPU Used: kernel 0 ms, user 58734 ms. Process Utilization 72%. System Idle 27%. Interval: 73760 ms.

Work around\Analysis:-

1. When we verified the sql error log we got an above error.
2. We have seen number of connections(thousands) from application\web servers.
3. It taking time even simple select query also, as per our analysis with respective team there is a issue in application code they confirmed.
4. Our Server is running sql server 2012 RTM version, due to this one of the reason also and as per the Microsoft below article issue with in RTM version.

Reference:-https://support.microsoft.com/en-us/help/2699013/fix-sql-server-2012,-sql-server-2008-r2-or-sql-server-2008-stops-responding-and-a-non-yielding-scheduler-error-is-logged

Resolution for temporary fix:-

1. we need to restart the sql server after the application stop.
2. After restarting the sql, its working every thing is fine.

Resolution for Permanent fix:-

For SQL engine prospective need to apply the 2723749 Cumulative update package 3 for SQL Server 2012 or install the SQL Server 2012 service pack 1 or else latest service pack.

Service packs information: https://sqlserverbuilds.blogspot.in/

Thank you..!

No comments:

Post a Comment

Disable CDC at table level

 How to Disable CDC( Change Data Capture) for tables Change Data Capture (cdc) property is disabled as default.  here I will Query you how t...