Skip to content

Latest commit

 

History

History
51 lines (36 loc) · 2.45 KB

File metadata and controls

51 lines (36 loc) · 2.45 KB
title Server Configuration: blocked process threshold
description Learn how to use the blocked process threshold option to specify the interval at which SQL Server generates blocked process reports and issues alerts.
author rwestMSFT
ms.author randolphwest
ms.date 08/26/2025
ms.service sql
ms.subservice configuration
ms.topic how-to
helpviewer_keywords
thresholds [SQL Server]
blocked process threshold option

Server configuration: blocked process threshold

[!INCLUDE SQL Server]

Use the blocked process threshold option to specify the threshold, in seconds, at which blocked process reports are generated. The threshold can be set from 5 to 86,400. The lock monitor only wakes up every 5 seconds to detect blocking conditions (it's also looking for other conditions such as deadlocks). Therefore, if you set a blocked process threshold value to 1, it doesn't detect a process that has been blocking for 1 second. The minimum time it can detect a blocked process is 5 seconds.

By default, no blocked process reports are produced. This event isn't generated for system tasks or for tasks that are waiting on resources that don't generate detectable deadlocks.

You can define an alert to be executed when this event is generated. So for example, you can choose to page the administrator to take appropriate action to handle the blocking situation.

Blocked process threshold uses the deadlock monitor background thread to walk through the list of tasks waiting for a time greater than or multiples of the configured threshold. The event is generated once per reporting interval for each of the blocked tasks.

The blocked process report is done on a best effort basis. There's no guarantee of any real-time or even close to real-time reporting.

The setting takes effect immediately without a server stop and restart.

Examples

The following example sets the blocked process threshold to 20 seconds, generating a blocked process report for each task that is blocked.

EXECUTE sp_configure 'show advanced options', 1;
GO

RECONFIGURE;
GO

EXECUTE sp_configure 'blocked process threshold', 20;
GO

RECONFIGURE;
GO

Related content