Quantcast
Channel: SQL Archives - SQL Authority with Pinal Dave
Viewing all articles
Browse latest Browse all 594

SQL SERVER – Many BACKGROUND Threads with Command VDI_CLIENT_WORKER

$
0
0

SQL SERVER - Many BACKGROUND Threads with Command VDI_CLIENT_WORKER laptop There are so many wait types available in SQL Server and sometimes I feel that it’s an ocean of wait types. I have already written about most common wait types earlier. In this blog, we would learn about VDI_CLIENT_WORKER / VDI_CLIENT_OTHER wait type. SQL SERVER – Introduction to Wait Stats and Wait Types – Wait Type – Day 1 of 28

Recently one of my clients showed me many background threads having wait type VDI_CLIENT_WORKER. As per them, they must restart the instance to get rid of them but after few hours, it appears again. When I was looking at the CPU and IO for this SPID, it was not increasing. All I observed is that wait type was increasing for VDI_CLIENT_WORKER and then it changes to VDI_CLIENT_OTHER.

Looking at those SPIDs we observed their start time in sysprocesses and then I looked further in ERRORLOG for the same timings. Interestingly, I could see below.

Automatic seeding of availability database ‘PROD_HRMS_DB’ in availability group ‘PRODUCTION_AG’ failed with a transient error. The operation will be retried.

SOLUTION/WORKAROUND

As soon as I saw seeding relate message, I immediately checked their AlwaysOn availability group. I found that one of the availability databases was not present on the secondary replica. So, as soon as they start SQL Service on secondary, seeding kicks off automatically.

To fix this problem, we disabled automatic seeding for this replica using the following command.

ALTER AVAILABILITY GROUP [MyAGNameGoesHere] 
    MODIFY REPLICA ON 'Name_of_secondary_replica'   
    WITH (SEEDING_MODE = MANUAL)
GO

And then we performed manual backup and restore. Here are few more blogs about Automatic seeding I wrote earlier.

Have you seen any such interesting issues with Always On Availability Group seeding feature?

Reference: Pinal Dave (https://blog.sqlauthority.com)

First appeared on SQL SERVER – Many BACKGROUND Threads with Command VDI_CLIENT_WORKER


Viewing all articles
Browse latest Browse all 594

Trending Articles