You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user-guide/best-practices/prevent-ui-crashes-from-large-queries.md
+25-17Lines changed: 25 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,16 @@
1
-
OpenObserve does not restrict the number of records returned or the length of the time range in a query.
1
+
OpenObserve does not restrict the number of records returned or the length of the time range in a query. You can query a few minutes or a longer time range, depending on your data retention settings (by default, 1 year, may vary by configuration).
2
2
3
-
You can query a few minutes or a longer time range, based on your data retention settings. The default retention is 1 year, but this may vary by configuration.
3
+
!!! warning
4
+
Queries that return a **large number of records** or **generate a large payload** can overload the browser. This may cause the UI to crash, particularly on the **Log Search** page or in **Dashboard panels**.
4
5
5
-
However, queries that return a large number of results, especially those with small time intervals, breakdown fields, or large text fields, can overload the browser.
6
-
This may cause the UI to become unresponsive or crash, particularly on the **Logs** page or in **Dashboard Panels**.
6
+
This typically happens when:
7
7
8
-
Two scenarios where this risk is significant:
8
+
- A small interval is used over a long time range, resulting in too many rows.
9
+
- Large text fields, such as `log.body`, are included, increasing payload size.
10
+
11
+
12
+
13
+
Use the guidance below to understand these risks and avoid them when building queries and dashboards.
9
14
10
15
## 1. Long Range Queries with Small Intervals
11
16
@@ -29,18 +34,21 @@ ORDER BY log_time_interval ASC
29
34
30
35
The above query returns the number of logs collected every 5 minutes. When run over a 7-day period, it generates more than 2,000 time buckets, each representing a row that the browser must load and render. This volume of data can cause the UI to become unresponsive or crash.
31
36
32
-
> **Note:** <br>
33
-
>**In Dashboard Panels- Breakdown Fields Multiply the Problem**<br>
34
-
>In dashboard panels, if you add a breakdown to the query (e.g., by `log.level`), it multiplies the number of rows. <br> For example,
35
-
>
36
-
>- You already have 2,000 time buckets
37
-
>-`log.level` has 5 unique values: `INFO`, `ERROR`, `DEBUG`, `WARN`, `TRACE`
38
-
>
39
-
>The result becomes: 2,000 time buckets × 5 breakdown values = 10,000 rows
40
-
>
41
-
>That is 5X more data than without the breakdown.
42
-
>
43
-
>All of it must be fetched, loaded, and rendered in your browser. It ends up crashing the UI.
37
+
38
+
!!! Note
39
+
**In Dashboard Panels- Breakdown Fields Multiply the Problem**
40
+
41
+
In dashboard panels, if you add a breakdown to the query (e.g., by `log.level`), it multiplies the number of rows. If the query is long range and has small time interval, adding breakdown to the Panels would further worsen the problem.
0 commit comments