Skip to content

Commit 0fdc67b

Browse files
committed
search-jobs: document new ENVs
Adds a table to document the ENVs we added in sourcegraph/sourcegraph#4975 Test plan: N/A
1 parent d6c3820 commit 0fdc67b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/code-search/types/search-jobs.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@ If the `blobstore` service is deployed, and you want to use it to store results
4949

5050
To use a third party managed object storage service, see instructions in [externalizing object storage](../../admin/external_services/object_storage#search-job-results).
5151

52+
### Environment Variables
53+
54+
You can configure Search Jobs behavior using the following environment variables on the worker service:
55+
56+
| Environment Variable | Default Value | Description |
57+
| --- | --- | --- |
58+
| `SRC_SEARCH_JOB_WORKER_INTERVAL` | `1s` | Controls how frequently the system checks for new search jobs to process. You probably don't need to configure this.|
59+
| `SRC_SEARCH_JOB_MAXIMUM_RUNTIME_PER_JOB` | `5h` | Sets a maximum time limit for how long a search job can run per repository-revision pair. Note that a search job is run as a collection of many smaller searches, each targeting a single revision of a repository. This ENV targets the maximum runtime of individual searches.|
60+
| `SRC_SEARCH_JOB_NUM_HANDLERS` | `5` | Adjusts how many searches can run in parallel. A value of 5 (default) means that 5 searches, each targeting a different repository-revision pair, can run in parallel. More handlers put more pressure on the backend, particularly on Searcher and Zoekt. Make sure you have sufficient resources before increasing the number of handlers. |
61+
5262
## Supported result types
5363

5464
Search jobs supports the following result types:

0 commit comments

Comments
 (0)