SQL Server is a powerful database management system that handles various tasks and processes simultaneously. However, sometimes we encounter wait types that can affect the performance and stability of the server. One such wait type is VDI_CLIENT_WORKER / VDI_CLIENT_OTHER.
Recently, I came across a client who was experiencing issues with background threads having the wait type VDI_CLIENT_WORKER. They were restarting the SQL Server instance to temporarily resolve the problem, but it would reappear after a few hours. Upon further investigation, I noticed that the CPU and IO for the affected SPID were not increasing. The only thing that was changing was the wait type, which would transition from VDI_CLIENT_WORKER to VDI_CLIENT_OTHER.
After examining the start time of these SPIDs in the sysprocesses table and cross-referencing it with the SQL Server error log, I discovered an interesting correlation. There was an automatic seeding failure for an availability database in the AlwaysOn availability group. This failure was causing the VDI_CLIENT_WORKER wait type to occur.
To resolve this issue, we needed to ensure that the availability database was present on the secondary replica. 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)
GOAfter disabling automatic seeding, we performed a manual backup and restore to synchronize the availability database on the secondary replica.
Automatic seeding in AlwaysOn availability groups can sometimes encounter transient errors, leading to wait types like VDI_CLIENT_WORKER and VDI_CLIENT_OTHER. By understanding the underlying cause and taking appropriate actions, such as disabling automatic seeding and performing manual synchronization, you can resolve these issues and ensure the smooth operation of your SQL Server environment.
Have you encountered any interesting issues with the AlwaysOn Availability Group seeding feature? Share your experiences in the comments below!