BROKER_SHUTDOWN SQL Server Wait Type

Wait Type BROKER_SHUTDOWN

The wait type BROKER_SHUTDOWN is ranked #200 by Stedman Solutions and Database Health Monitor.

Wait statistics, in the context of SQL Server, refer to the amount of time that a query spends waiting to access data in the database. When a client application requests data from the database, the request is placed in a queue and the client application must wait for its turn to access the data. The time that the query spends waiting is called a "wait" and is tracked by SQL Server. This information can be used to identify potential performance bottlenecks and optimize the performance of the database. Wait statistics are commonly used by database administrators to diagnose and troubleshoot performance issues in SQL Server.


SQL Server uses wait types to indicate where tasks or processes are encountering delays. The BROKER_SHUTDOWN wait type is related to Service Broker, a feature used for reliable messaging and asynchronous processing. This wait type occurs when Service Broker is shutting down, either because SQL Server is stopping or the feature is being disabled. Understanding this wait type can help ensure that your Service Broker environment shuts down cleanly without disruptions to other processes.

What Is the BROKER_SHUTDOWN Wait Type?

The BROKER_SHUTDOWN wait type appears when SQL Server is in the process of stopping Service Broker operations. During shutdown, SQL Server ensures that all Service Broker messages are properly handled, and that tasks and queues are closed gracefully to avoid data loss or inconsistencies. This wait indicates that Service Broker is performing these cleanup tasks.

This wait type is typically seen during planned server shutdowns or when a database with Service Broker enabled is being taken offline.

When Does BROKER_SHUTDOWN Appear?

Common scenarios where BROKER_SHUTDOWN waits occur include:

  • SQL Server Shutdown – When SQL Server is stopping, it shuts down all Service Broker operations as part of the process.
  • Database Offline or Detach – If a database with Service Broker enabled is being taken offline or detached, this wait type may appear.
  • Service Broker Disablement – When Service Broker is explicitly disabled for a database, the feature must shut down gracefully.
  • High Message Volumes – Environments with large numbers of pending messages may experience longer waits during shutdown as the system processes or discards these messages.

Why BROKER_SHUTDOWN Waits Matter

In most cases, BROKER_SHUTDOWN waits are expected during routine shutdown operations. However, prolonged waits may indicate issues that need attention. Common causes include:

  • Large Message Backlogs – A significant number of unprocessed or pending messages can delay shutdown as the system tries to manage them.
  • Resource Bottlenecks – Insufficient CPU, memory, or disk resources can slow down the shutdown process.
  • Blocked Tasks – Other tasks holding locks or resources needed by Service Broker can interfere with shutdown operations.
  • Configuration Issues – Misconfigured Service Broker settings may prevent a clean shutdown.

How to Address BROKER_SHUTDOWN Waits

If BROKER_SHUTDOWN waits are taking longer than expected, consider these strategies:

  • Clear Message Queues – Monitor and clear Service Broker queues before shutting down to minimize delays. Use the sys.transmission_queue view to identify pending messages.
  • Monitor Resource Usage – Ensure sufficient CPU, memory, and disk resources are available during shutdown to handle Service Broker tasks efficiently.
  • Optimize Workloads – Reduce high workloads or message processing volumes before initiating a shutdown to avoid long cleanup times.
  • Check for Blocking Tasks – Use sys.dm_exec_requests to identify tasks or locks that may be interfering with Service Broker operations.
  • Validate Configurations – Ensure Service Broker is correctly configured, and that no misaligned settings are causing delays.

Monitoring BROKER_SHUTDOWN Waits

To track BROKER_SHUTDOWN waits, use SQL Server’s sys.dm_os_wait_stats to analyze occurrences and durations. You can also monitor Service Broker activity with sys.transmission_queue and sys.dm_broker_activated_tasks to identify any pending tasks or bottlenecks. Tools like Database Health Monitor provide powerful insights into wait statistics and system performance, helping you manage shutdown operations more effectively.

Stedman Solutions specializes in SQL Server performance tuning and troubleshooting. Whether you need assistance optimizing Service Broker operations, reducing wait types like BROKER_SHUTDOWN, or managing database workloads, we’re here to help. Our Database Health Monitor tool gives you real-time visibility into waits and system health, and our managed services deliver expert support for all your SQL Server needs. Contact us today to learn how we can enhance your SQL Server environment.


Watch on YouTube


Find out more about our SQL Server Managed Services

Applies to

    Related Waits

    BROKER_CONNECTION_RECEIVE_TASK
    BROKER_DISPATCHER
    BROKER_ENDPOINT_STATE_MUTEX
    BROKER_EVENTHANDLER
    BROKER_FORWARDER
    BROKER_INIT
    BROKER_MASTERSTART
    BROKER_RECEIVE_WAITFOR
    BROKER_REGISTERALLENDPOINTS
    BROKER_SERVICE
    BROKER_TASK_SHUTDOWN
    BROKER_TASK_STOP
    BROKER_TASK_SUBMIT
    BROKER_TRANSMISSION_OBJECT
    BROKER_TRANSMISSION_TABLE
    BROKER_TRANSMISSION_WORK
    BROKER_TRANSMITTER

    See Also


    All Wait Types
    BROKER_SHUTDOWN SQL Server Wait Type