---
title: "Data subscriptions: Monitoring"
description: "Monitor a running data subscription in RavenDB Studio: track its status, connected clients, and progress in the Ongoing Tasks view, and its connection activity over time in the Ongoing Task Stats graph."
url: "https://docs.ravendb.net/7.2/data-subscriptions/monitoring"
version: "7.2"
---

# Data subscriptions: Monitoring

> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

## Monitoring a data subscription

> **Note**
>
> - This page explains how to monitor a running data subscription using Studio.
>
> - The Ongoing Tasks view shows a subscription's current status, its progress, and the clients
>   currently connected to it.
>
> - The [Ongoing Task Stats](https://docs.ravendb.net/7.2/monitoring/performance-views/ongoing-task-stats.md) graph tracks a subscription's
>   activity over time, from each client connection down to the individual batches and the time spent on each.
>
> - In this article:
>   - [Subscription details](#subscription-details)
>     - [Opening the subscription details](#opening-the-subscription-details)
>     - [Status and connected clients](#status-and-connected-clients)
>   - [Subscription performance](#subscription-performance)
>     - [The subscription bar](#the-subscription-bar)
>     - [Connection and batch metrics](#connection-and-batch-metrics)
>     - [Connection event indicators](#connection-event-indicators)

## Subscription details {#subscription-details}

### Opening the subscription details

Open **`Tasks` > `Ongoing Tasks`**, where subscription tasks are listed under **Subscriptions**.  
Expand a subscription bar to view its current status and connected clients.

![Find the subscription in the ongoing tasks view](https://docs.ravendb.net/assets/images/subscriptions_ongoing-tasks_task-bar_collapsed-20394844ec0c739f4f0ec733b7f4df2b.png)

### Status and connected clients

![Subscription details](https://docs.ravendb.net/assets/images/subscriptions_ongoing-tasks_task-bar_expanded-cbb7a9af1dd8d22140d8544490633344.png)

1. **Last batch acknowledgment time**  
   The last time a worker acknowledged a batch.

2. **Last client connection time**  
   The last time a worker connected to the subscription.

3. **Change vector for next batch**  
   The point from which the server sends the next batch.  
   Hovering over the info icon shows the value.

4. **Task details**
   - **Node** - the node in the database group that runs the subscription, shown in
     the database group topology.
   - **Status** - whether a worker is connected: **Active** when one is, otherwise not active.
   - **Error** - any error reported for the task; a dash when there are none.
   - **State** - the task's overall state, shown as **OK** when the task is healthy.

5. **Connected clients**  
   The workers currently consuming the subscription.  
   The **subscription mode** is shown (here **Concurrent**), and each connected worker is listed with
   its connection strategy and client URI. Click **Disconnect** to drop an individual worker.

For the API equivalents of disconnecting, see
[Dropping a worker](https://docs.ravendb.net/7.2/data-subscriptions/concurrent-subscriptions.md#dropping-a-worker)
and [Dropping connections](https://docs.ravendb.net/7.2/data-subscriptions/maintenance-operations.md#dropping-connections).

## Subscription performance {#subscription-performance}

### The subscription bar

Open **`Stats` > `Ongoing Task Stats`**, where a bar on the performance timeline shows the
subscription's activity.

![The subscription on the ongoing task stats timeline](https://docs.ravendb.net/assets/images/subscriptions_task-stats_collapsed-972e5dd640452337a0dc6043957e7fd3.png)

1. **Subscription bar**  
   The subscription's bar on the performance timeline. Click it to open the breakdown below.

2. **Query**  
   The server-side query that selects the documents. Click the eye icon to view it.

### Connection and batch metrics

[Expanding the bar](https://docs.ravendb.net/7.2/monitoring/performance-views/ongoing-task-stats.md#expanding-a-track) breaks each client
connection into the batches it processed and the time spent in each phase.  
Hovering over a bar shows the bar's metrics:

![The expanded subscription bar](https://docs.ravendb.net/assets/images/subscriptions_task-stats_expanded-ae63d3167a9d7be6e3ba4e4f5a1e1225.png)

- **Client connection**  
  The worker's entire connection: duration, client URI, strategy, number of batches acknowledged,
  and the total size of all batches.

- **Documents batch**  
  A single batch the server sent: total duration, the number and size of documents sent, and the
  number and size of any included documents, counters, and time-series entries.

- **Sending documents**  
  Within a batch, the time the server spent sending the documents to the worker.

- **Waiting for ACK**  
  Within a batch, the time spent waiting for the worker to acknowledge the batch.

### Connection event indicators

In the stats view, **connection event indicators** signify events related to the initiation, state,
or termination of a worker's connection.

Available indicators:

| Indicator | Meaning |
| :-: | - |
| ![Connection initiated](https://raw.githubusercontent.com/ravendb/docs/main/docs/data-subscriptions/assets/subscriptions_task-stats_indicator-initiated.png) | **Connection initiated.** A worker has connected to the subscription. |
| ![Connection aborted](https://raw.githubusercontent.com/ravendb/docs/main/docs/data-subscriptions/assets/subscriptions_task-stats_indicator-aborted.png) | **Connection aborted.** The worker forcibly closed its connection. |
| ![Connection rejected](https://raw.githubusercontent.com/ravendb/docs/main/docs/data-subscriptions/assets/subscriptions_task-stats_indicator-rejected.png) | **Connection rejected.** A worker using the [OpenIfFree](https://docs.ravendb.net/7.2/data-subscriptions/consuming-subscription.md#worker-strategies) strategy tried to connect while another worker held the subscription, so the server rejected it. |
| ![Pending connection](https://raw.githubusercontent.com/ravendb/docs/main/docs/data-subscriptions/assets/subscriptions_task-stats_indicator-pending.png) | **Pending connection.** A worker using the [WaitForFree](https://docs.ravendb.net/7.2/data-subscriptions/consuming-subscription.md#worker-strategies) strategy tried to connect while another worker held the subscription. Instead of being rejected, it waits for the current worker to disconnect, then connects. |

---

#### Example: Rejected and pending connections

![Connection event indicators on the timeline](https://docs.ravendb.net/assets/images/subscriptions_task-stats_indicators-pending-e613e523576503f17cfb94dc8b13d04b.png)

In this example:

1. Worker **A**, using the `OpenIfFree` strategy, connects to the subscription.
2. Worker **C**, using the `OpenIfFree` strategy, attempts to connect to the same subscription.  
   Because A holds the subscription, the server rejects C's connection attempt.
3. Worker **B**, using the `WaitForFree` strategy, attempts to connect to the same subscription.  
   Because A holds the subscription, B does not connect immediately and waits in a **pending** state.
4. Worker **A** ends its connection with the subscription.
5. Worker **B** now connects.
6. Worker **B** aborts its connection.
