nano SIEM
Settings

Search settings

Supported in:Self-hosted

Search admission (concurrency and queueing), per-priority ClickHouse resource budgets and query safety limits.

Use Settings → Search (/settings/search) to control search concurrency, queue waits, and query safety limits. Detection rules bypass these admission limits.

The page has three sections, saved with two buttons:

SectionWhat it controlsAPI
Concurrency limitsAd-hoc search slots and the wait queueGET/PUT /api/settings/search
Resource budgetsPer-priority execution time and memory caps (fixed defaults; see below)GET/PUT /api/settings/search
Query safetyArray, expansion, post-processing and cache caps, and cost-error blockingGET/PUT /api/settings/search/query-limits

Reading and changing these settings requires the settings:system permission.

How admission works

Every search is given a priority:

PriorityUsed forAdmission
DetectionScheduled detection rulesBypasses the queue, always runs
Near-realtimeNear-realtime rulesBypasses the queue, always runs
InteractiveAnalyst searches on the Search pageCounts against the limits below
AnalyticsLong-running huntsCounts against the limits below

For Interactive and Analytics searches:

  1. If a slot is free under the global ad-hoc limit and you are under your per-user limit, the search starts.
  2. Otherwise it waits in a priority queue (by priority, then arrival time). While it waits, the Search page shows its queue position and a cancel button.
  3. A search fails with Search queue is full when the queue is at max queue depth, or when you already hold your per-user limit and your share of the queue is full.
  4. A search that waits longer than the queue timeout fails with Search queue timeout.

Concurrency limits

SettingFieldDefaultRange
Global ad-hoc limitglobal_adhoc_limit301–500
Per-user limitper_user_limit101–50, and not more than the global limit
Max queue depthmax_queue_depth10010–1,000
Queue timeoutqueue_timeout_seconds300 s10–600 s

One run of the Search page uses several queries at once (results, histogram and field statistics), so keep the per-user limit well above 1.

The search service rereads these settings every 60 seconds; no restart is needed. If it can't read them from Postgres at startup, it falls back to the environment variables SEARCH_GLOBAL_ADHOC_LIMIT, SEARCH_PER_USER_LIMIT, SEARCH_MAX_QUEUE_DEPTH and SEARCH_QUEUE_TIMEOUT_MS (milliseconds).

Resource budgets

Per-priority caps on execution time and memory for each query.

Priority rowMax execution time (default, range)Max memory (default, range)
Realtime (detections, near-realtime)30 s, 5–1205 GB, 1–20
Interactive300 s, 30–3,60020 GB, 1–100
Analytics3,600 s, 60–7,20050 GB, 5–200

Query safety

SettingFieldDefaultRangeWhat it does
Max array aggregation sizemax_group_array_size100100–1,000,000Maximum elements per group for values() and list(). Larger arrays are truncated without an error.
Max mvexpand rowsmax_mvexpand_rows100,0001,000–10,000,000Row cap for mvexpand when the query doesn't give limit=N.
Max post-processing groupsmax_post_processing_groups1,000,00010,000–10,000,000Maximum groups when stats, top or rare run after a Nano-side stage such as lookup or prevalence. Extra groups are dropped.
Max streaming cache rowsmax_streaming_cache_rows50,0001,000–1,000,000Rows kept for instant re-display of a streamed result. Larger results still stream but aren't cached.
Block queries with cost-analysis errorsblock_on_cost_errorsOffOn / offRejects a query before it runs if cost analysis finds an Error-severity problem.

The search service reloads query safety limits from PostgreSQL every 60 seconds.

An explicit limit on the command always wins over max_mvexpand_rows:

class_uid=4003 | mvexpand answers.rdata limit=500

Cost-analysis errors

With Block queries with cost-analysis errors off, these appear as warnings in the search results and the query still runs. With it on, the query is refused with the reason and a suggested fix.

CodeTrigger
UNBOUNDED_DEDUPdedup without an earlier head or aggregation
UNBOUNDED_TRANSACTIONtransaction without both maxspan and maxevents
UNBOUNDED_EVENTSTATSeventstats without an earlier limit or aggregation
UNBOUNDED_STREAMSTATSstreamstats without an earlier limit or aggregation

Info- and Warning-severity findings (for example UNBOUNDED_SORT or TINY_TIMECHART_SPAN) are always advisory.

API

# Read admission settings
curl -H "X-API-Key: $NANO_API_KEY" https://<host>/api/settings/search

# Change query safety limits
curl -X PUT -H "X-API-Key: $NANO_API_KEY" -H "Content-Type: application/json" \
  -d '{"max_group_array_size": 10000, "max_mvexpand_rows": 250000,
       "max_post_processing_groups": 1000000, "max_streaming_cache_rows": 50000,
       "block_on_cost_errors": true}' \
  https://<host>/api/settings/search/query-limits

Troubleshoot

Need help with these checks? Contact support with the request ID and time with timezone.

Search waits or fails in the queue

Check the global ad-hoc limit, per-user limit, queue depth, and timeout. A Search page run uses several queries, so a per-user limit of 1 can prevent a complete run.

Changing a resource budget has no effect

The search service does not read the resource-budget rows; it applies fixed per-priority caps. To give queries more memory, raise ClickHouse's memory and its user profile's max_memory_usage.

What's next

On this page