From 27ffc5686d6035720390ff62fbb05dc5013857fc Mon Sep 17 00:00:00 2001 From: Marc LeBlanc <7050295+marcleblanc2@users.noreply.github.com> Date: Fri, 30 Oct 2026 21:19:10 -0600 Subject: [PATCH 1/2] docs(code-monitoring): add Advanced section on result limit, timeout, and site config Amp-Thread-ID: https://ampcode.com/threads/T-01a18fea-4df4-700f-91ed-8f4c554d90f8 Co-authored-by: Amp --- docs/code-monitoring/index.mdx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/code-monitoring/index.mdx b/docs/code-monitoring/index.mdx index f21291fbe..64dc3810a 100644 --- a/docs/code-monitoring/index.mdx +++ b/docs/code-monitoring/index.mdx @@ -200,3 +200,22 @@ Code monitors have been designed to be performant even for large Sourcegraph ins ## Architecture Learn about how Code Monitoring fits into Sourcegraph in the [architecture overview](/admin/architecture#code-monitoring). + +## Advanced + +### Result limit and timeout + +Each run of a code monitor is a regular search, with the same result limit and timeout as a search from the search bar. When a run reaches either limit, it stops and notifies you about the results found so far; commits it did not reach are not searched again on the next run. Set these in the monitor's query: + +- [`count:`](/code-search/queries/language#count): the maximum number of results per run. Default: 10,000. +- [`timeout:`](/code-search/queries/language#timeout): how long a run may search. Default: 20 seconds. A query with `count:` but no `timeout:` uses the maximum timeout. + +For example, `repo:^github\.example\.com/ type:diff TODO count:50000 timeout:120s`. + +Email and Slack notifications show the total number of new results and the first 5; webhook notifications include every result. + +### Site configuration + +The `codeMonitors` object in [advanced configuration](/admin/config/site-config#reference) controls the worker that runs code monitors: `pollInterval` is how often each monitor runs, `concurrency` is how many monitor jobs run at once, and `maxRuntime` is how long a job may run before it is stopped. Raise `maxRuntime` with `timeout:`, so the job is not stopped before its search finishes. + +`timeout:` cannot exceed the instance's [maximum search timeout](/admin/search#maximum-timeout). From ef70172bde7c56d20d1d9a005c635d54aed66636 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 31 Oct 2026 03:49:06 +0000 Subject: [PATCH 2/2] Add jobutil to cspell-allow-list.txt --- cspell-allow-list.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/cspell-allow-list.txt b/cspell-allow-list.txt index 2177b4e74..3f991854b 100644 --- a/cspell-allow-list.txt +++ b/cspell-allow-list.txt @@ -281,6 +281,7 @@ Jaccard JCEF jiapantw jiti +jobutil journalctl Jsonnet jsonschemadoc