Describe the bug
In VictoriaLogs Web UI (vmui), users can enter very large numbers (e.g., millions) in the limit field when querying logs.
This can cause:
- The browser to freeze or crash due to the huge volume of log entries being rendered.
- The backend to run out of memory and crash in some cases.
The limit query parameter takes a dedicated backend path that is tuned for speed, not for huge log volumes, because inspecting that many entries in the UI would be impractical for a person.
This issue does not occur with the CLI, as the CLI doesn't use limit query arg and processes data as a stream from the service, and the service also enforces memory limits on certain pipe, such as sort.
To Reproduce
Entering a very large number in the limit text box of vmui.
Solution
- Enforce a hard upper limit (e.g., 10,000) on the limit value in the Web UI and Grafana plugin to prevent users from entering excessively large numbers in the
limit field. If a user tries to exceed this limit, show a warning in the UI explaining why this is not allowed. Provide a link to documentation that explains why there is an upper limit (browser and server stability). Offers guidance on how to export larger amounts of logs using the CLI, which does not have this problem.
- For backend, apply a memory limit in the backend like the
sort pipe does.
Describe the bug
In VictoriaLogs Web UI (vmui), users can enter very large numbers (e.g., millions) in the
limitfield when querying logs.This can cause:
The
limitquery parameter takes a dedicated backend path that is tuned for speed, not for huge log volumes, because inspecting that many entries in the UI would be impractical for a person.This issue does not occur with the CLI, as the CLI doesn't use
limitquery arg and processes data as a stream from the service, and the service also enforces memory limits on certainpipe, such assort.To Reproduce
Entering a very large number in the
limittext box of vmui.Solution
limitfield. If a user tries to exceed this limit, show a warning in the UI explaining why this is not allowed. Provide a link to documentation that explains why there is an upper limit (browser and server stability). Offers guidance on how to export larger amounts of logs using the CLI, which does not have this problem.sortpipe does.