# Set the topology filtering limit

## Overview

To optimize performance, a limit is placed on the amount of elements that can be loaded to produce a topology visualization. The filtering limit has a default value of 10000 elements.

If a [topology filter](/5.1/use/stackstate-ui/filters.md) loads more components than specified in the filtering limit, a message will be displayed on screen and no topology visualization will be displayed.

{% hint style="info" %}
The filtering limit is applied to the total amount of elements that need to be **loaded** and not the amount of elements that will be displayed.
{% endhint %}

## Configure default filtering limit

If required, the default filtering limit can be manually configured.

{% tabs %}
{% tab title="Kubernetes" %}
To set a custom filtering limit, add the following to the `values.yaml` file used to deploy StackState:

{% code lineNumbers="true" %}

```yaml
stackstate:
  components:
    api:
      config: |
         stackstate.webUIConfig.maxStackElementCount = <newvalue>

stackstate:
  components:
    view-health:
      config: |
         stackstate.webUIConfig.maxStackElementCount = <newvalue>
```

{% endcode %}
{% endtab %}

{% tab title="Linux" %}
Set a custom filtering limit in `etc/application_stackstate.conf` using the parameters `stackstate.webUIConfig.maxStackElementCount` and `stackstate.topologyQueryService.maxStackElementsPerQuery`.
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://archivedocs.stackstate.com/5.1/configure/topology/topology-filtering-limits.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
