Commit d59cfef
committed
fix: cap pg_stat_statements to top 100 queries, increase VM concurrency
100K distinct queryids were creating a cardinality explosion in
VictoriaMetrics, causing 429 (Too Many Requests) on all dashboard
queries. The WHERE filter alone (calls >= 5 OR exec_time >= 1000ms)
was insufficient.
Changes:
- Add ORDER BY exec_time_total DESC LIMIT 100 to both v11 and v17
pg_stat_statements SQL queries — only the top 100 queries by
execution time are exported to Prometheus
- Increase search.maxConcurrentRequests from 4 to 16 in both
docker-compose.yml and Helm values to prevent 429s when Grafana
dashboards issue many parallel queries
https://claude.ai/code/session_01SzJxzZNQjDQphaHyaX3RU71 parent 42211c9 commit d59cfef
3 files changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1036 | 1036 | | |
1037 | 1037 | | |
1038 | 1038 | | |
| 1039 | + | |
| 1040 | + | |
1039 | 1041 | | |
1040 | 1042 | | |
1041 | 1043 | | |
| |||
1083 | 1085 | | |
1084 | 1086 | | |
1085 | 1087 | | |
| 1088 | + | |
| 1089 | + | |
1086 | 1090 | | |
1087 | 1091 | | |
1088 | 1092 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
0 commit comments