The query of death
Lastly, care should be taken when crafting queries with overly broad selectors and memory-intensive aggregations. While Prometheus has default checks and bounds implemented to avoid unlimited memory usage (as discussed in Chapter 5, Running a Prometheus Server), it is still possible to run up against a memory limit that is not large enough—either a container limit or even the actual system RAM, which would make the OS unceremoniously terminate the Prometheus server. Compounding the problem, pinpointing which queries are using the most resources is hard, especially in environments where you have little control over what queries are sent to the server; there is no slow query log functionality built in as making it work would ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access