From 292cf3dc277269b684059695656863632100a953 Mon Sep 17 00:00:00 2001 From: Ramon Smits Date: Mon, 31 Aug 2026 17:24:54 +0200 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=93=9D=20Document=20ServiceControl.Au?= =?UTF-8?q?dit/QueryTimeoutInSeconds=20setting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- servicecontrol/audit-instances/configuration.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/servicecontrol/audit-instances/configuration.md b/servicecontrol/audit-instances/configuration.md index ce2539f98e8..c301dce8b7a 100644 --- a/servicecontrol/audit-instances/configuration.md +++ b/servicecontrol/audit-instances/configuration.md @@ -881,6 +881,23 @@ Configures the maximum duration, in seconds, for processing a batch of audited m | --- | --- | | int | `60` (1 minute) | +#end-if + +#if-version [6.20,) +### ServiceControl.Audit/QueryTimeoutInSeconds + +Configures the maximum duration, in seconds, that an audit message query (for example a message search or a conversation lookup issued by ServicePulse or ServiceInsight) is allowed to run before it is cancelled. This protects the RavenDB server from queries over very large data sets that would otherwise run for a long time and consume large amounts of temporary disk space. Values larger than one hour fall back to the default. + +| Context | Name | +| --- | --- | +| **Environment variable** | `SERVICECONTROL_AUDIT_QUERYTIMEOUTINSECONDS` | +| **App config key** | `ServiceControl.Audit/QueryTimeoutInSeconds` | +| **SCMU field** | N/A | + +| Type | Default value | +| --- | --- | +| int | `30` (30 seconds) | + #end-if ## Transport From 236c9dcb808363d022c0aba72fd3c0350258aac0 Mon Sep 17 00:00:00 2001 From: Ramon Smits Date: Mon, 31 Aug 2026 17:44:07 +0200 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=93=9D=20Document=20ServiceControl/Qu?= =?UTF-8?q?eryTimeoutInSeconds=20setting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../servicecontrol-instances/configuration.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/servicecontrol/servicecontrol-instances/configuration.md b/servicecontrol/servicecontrol-instances/configuration.md index 41bb1b2c72d..4c3fbb334f4 100644 --- a/servicecontrol/servicecontrol-instances/configuration.md +++ b/servicecontrol/servicecontrol-instances/configuration.md @@ -976,6 +976,23 @@ Use this setting to configure whether the bodies of processed error messages sho > [!NOTE] > Changing the full-text search setting will cause indexes to be redeployed and rebuilt. Depending on the number of documents stored, this operation might take a long time and search results won't be available until completed. +#if-version [6.20,) +### ServiceControl/QueryTimeoutInSeconds + +Configures the maximum duration, in seconds, that a failed message view query (for example a message search or a conversation lookup issued by ServicePulse or ServiceInsight) is allowed to run before it is cancelled. This protects the RavenDB server from queries over very large data sets that would otherwise run for a long time and consume large amounts of temporary disk space. Values larger than one hour fall back to the default. Applies to all persisters. On the SQL Server and PostgreSQL persisters the `Database/CommandTimeout` setting additionally bounds each individual database command. + +| Context | Name | +| --- | --- | +| **Environment variable** | `SERVICECONTROL_QUERYTIMEOUTINSECONDS` | +| **App config key** | `ServiceControl/QueryTimeoutInSeconds` | +| **SCMU field** | N/A | + +| Type | Default value | +| --- | --- | +| int | `30` (30 seconds) | + +#end-if + ## Transport ### ServiceControl/TransportType From 0a6bb9f8e1b1593d0ed84549185f24fc8af69a04 Mon Sep 17 00:00:00 2001 From: Ramon Smits Date: Thu, 3 Sep 2026 12:08:13 +0200 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=93=9D=20Query=20timeout=20default=20?= =?UTF-8?q?is=201=20minute?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- servicecontrol/audit-instances/configuration.md | 2 +- servicecontrol/servicecontrol-instances/configuration.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/servicecontrol/audit-instances/configuration.md b/servicecontrol/audit-instances/configuration.md index c301dce8b7a..5f5808d5a3e 100644 --- a/servicecontrol/audit-instances/configuration.md +++ b/servicecontrol/audit-instances/configuration.md @@ -896,7 +896,7 @@ Configures the maximum duration, in seconds, that an audit message query (for ex | Type | Default value | | --- | --- | -| int | `30` (30 seconds) | +| int | `60` (1 minute) | #end-if ## Transport diff --git a/servicecontrol/servicecontrol-instances/configuration.md b/servicecontrol/servicecontrol-instances/configuration.md index 4c3fbb334f4..6aa33e833df 100644 --- a/servicecontrol/servicecontrol-instances/configuration.md +++ b/servicecontrol/servicecontrol-instances/configuration.md @@ -989,7 +989,7 @@ Configures the maximum duration, in seconds, that a failed message view query (f | Type | Default value | | --- | --- | -| int | `30` (30 seconds) | +| int | `60` (1 minute) | #end-if From c3bd3b6f399494d7fbfaebe3e23fd2ae7d6238ad Mon Sep 17 00:00:00 2001 From: Ramon Smits Date: Fri, 4 Sep 2026 16:25:17 +0200 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=93=9D=20Query=20timeout=20answers=20?= =?UTF-8?q?with=20504=20and=20partial=20composite=20results?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- servicecontrol/audit-instances/configuration.md | 2 ++ servicecontrol/servicecontrol-instances/configuration.md | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/servicecontrol/audit-instances/configuration.md b/servicecontrol/audit-instances/configuration.md index 5f5808d5a3e..94911b1281b 100644 --- a/servicecontrol/audit-instances/configuration.md +++ b/servicecontrol/audit-instances/configuration.md @@ -888,6 +888,8 @@ Configures the maximum duration, in seconds, for processing a batch of audited m Configures the maximum duration, in seconds, that an audit message query (for example a message search or a conversation lookup issued by ServicePulse or ServiceInsight) is allowed to run before it is cancelled. This protects the RavenDB server from queries over very large data sets that would otherwise run for a long time and consume large amounts of temporary disk space. Values larger than one hour fall back to the default. +A query that runs out of its allowed time is answered with HTTP status `504 Gateway Timeout` and a problem details body that names this setting. The error instance treats that answer as a missing instance rather than as an instance with no data, see [`ServiceControl/QueryTimeoutInSeconds`](/servicecontrol/servicecontrol-instances/configuration.md#performance-tuning-servicecontrol-querytimeoutinseconds), and should be configured with the same value. + | Context | Name | | --- | --- | | **Environment variable** | `SERVICECONTROL_AUDIT_QUERYTIMEOUTINSECONDS` | diff --git a/servicecontrol/servicecontrol-instances/configuration.md b/servicecontrol/servicecontrol-instances/configuration.md index 6aa33e833df..27f5ac19161 100644 --- a/servicecontrol/servicecontrol-instances/configuration.md +++ b/servicecontrol/servicecontrol-instances/configuration.md @@ -979,7 +979,13 @@ Use this setting to configure whether the bodies of processed error messages sho #if-version [6.20,) ### ServiceControl/QueryTimeoutInSeconds -Configures the maximum duration, in seconds, that a failed message view query (for example a message search or a conversation lookup issued by ServicePulse or ServiceInsight) is allowed to run before it is cancelled. This protects the RavenDB server from queries over very large data sets that would otherwise run for a long time and consume large amounts of temporary disk space. Values larger than one hour fall back to the default. Applies to all persisters. On the SQL Server and PostgreSQL persisters the `Database/CommandTimeout` setting additionally bounds each individual database command. +Configures the maximum duration, in seconds, that a failed message view query (for example a message search or a conversation lookup issued by ServicePulse or ServiceInsight) is allowed to run before it is cancelled. This protects the database server from queries over very large data sets that would otherwise run for a long time and consume large amounts of temporary disk space. Values larger than one hour fall back to the default. Applies to all persisters. On the SQL Server and PostgreSQL persisters the database commands issued by these queries use this value as their command timeout, so `Database/CommandTimeout` does not apply to them. + +A query that runs out of its allowed time is answered with HTTP status `504 Gateway Timeout` and a problem details body that names this setting. + +When the instance gathers a message view from its own database and the configured [audit instances](/servicecontrol/audit-instances/), a timed-out or unreachable instance does not fail the request. The response contains the data of the instances that did answer, carries no `ETag`, and lists the missing instances in the `X-Particular-Incomplete-Results` header as `instanceId:reason` entries, where the reason is `timeout`, `unavailable` or `error`. Only when no instance answered and at least one of them timed out is the request answered with `504 Gateway Timeout`. + +The instance waits for an audit instance's answer for this duration plus 30 seconds, so the same value should be configured on the audit instances through `ServiceControl.Audit/QueryTimeoutInSeconds`. | Context | Name | | --- | --- | From 079bc64748b0193f351825415fe6980484c7c792 Mon Sep 17 00:00:00 2001 From: Ramon Smits Date: Mon, 7 Sep 2026 16:12:30 +0200 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=93=9D=20The=20error=20instance's=20q?= =?UTF-8?q?uery=20time=20limit=20bounds=20the=20composite?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- servicecontrol/audit-instances/configuration.md | 2 +- servicecontrol/servicecontrol-instances/configuration.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/servicecontrol/audit-instances/configuration.md b/servicecontrol/audit-instances/configuration.md index 94911b1281b..b0556370524 100644 --- a/servicecontrol/audit-instances/configuration.md +++ b/servicecontrol/audit-instances/configuration.md @@ -888,7 +888,7 @@ Configures the maximum duration, in seconds, for processing a batch of audited m Configures the maximum duration, in seconds, that an audit message query (for example a message search or a conversation lookup issued by ServicePulse or ServiceInsight) is allowed to run before it is cancelled. This protects the RavenDB server from queries over very large data sets that would otherwise run for a long time and consume large amounts of temporary disk space. Values larger than one hour fall back to the default. -A query that runs out of its allowed time is answered with HTTP status `504 Gateway Timeout` and a problem details body that names this setting. The error instance treats that answer as a missing instance rather than as an instance with no data, see [`ServiceControl/QueryTimeoutInSeconds`](/servicecontrol/servicecontrol-instances/configuration.md#performance-tuning-servicecontrol-querytimeoutinseconds), and should be configured with the same value. +A query that runs out of its allowed time is answered with HTTP status `504 Gateway Timeout` and a problem details body that names this setting. The error instance treats that answer as a missing instance rather than as an instance with no data. How long the error instance waits for an audit instance is bounded by its own [`ServiceControl/QueryTimeoutInSeconds`](/servicecontrol/servicecontrol-instances/configuration.md#performance-tuning-servicecontrol-querytimeoutinseconds), independently of this value. | Context | Name | | --- | --- | diff --git a/servicecontrol/servicecontrol-instances/configuration.md b/servicecontrol/servicecontrol-instances/configuration.md index 27f5ac19161..b06876ce633 100644 --- a/servicecontrol/servicecontrol-instances/configuration.md +++ b/servicecontrol/servicecontrol-instances/configuration.md @@ -985,7 +985,7 @@ A query that runs out of its allowed time is answered with HTTP status `504 Gate When the instance gathers a message view from its own database and the configured [audit instances](/servicecontrol/audit-instances/), a timed-out or unreachable instance does not fail the request. The response contains the data of the instances that did answer, carries no `ETag`, and lists the missing instances in the `X-Particular-Incomplete-Results` header as `instanceId:reason` entries, where the reason is `timeout`, `unavailable` or `error`. Only when no instance answered and at least one of them timed out is the request answered with `504 Gateway Timeout`. -The instance waits for an audit instance's answer for this duration plus 30 seconds, so the same value should be configured on the audit instances through `ServiceControl.Audit/QueryTimeoutInSeconds`. +The instance waits for an audit instance's answer for at most this duration, so it also bounds the whole query when an audit instance is slow, unresponsive, or configured with a larger `ServiceControl.Audit/QueryTimeoutInSeconds`. An audit instance that has not answered in time is reported as missing; its own limit still ends the query on its side. | Context | Name | | --- | --- |