-
Notifications
You must be signed in to change notification settings - Fork 272
Description
Describe the Bug:
Trying to view message logs on a busy system results in an error page.
Steps to Reproduce:
- Go to Admin -> Message Logs on a system with ~1000 recent messages
- See error page
Expected Behavior:
A list of recent messages.
Observed Behavior:
An error page.
Screenshots/Stack Traces:
Application Version:
$ goalert version
Version: v0.28.0-3077-g823f65a69
GitCommit: 823f65a69fcbe536d4490980e11e3949ba3e3b33 (clean)
BuildDate: 2022-08-29T01:59:58-05:00
GoVersion: go1.19 (gc)
Platform: linux/amd64
Migration: add-service-maintenance-expires-at (#225)
Additional Context:
The "auth limit" is a fail-safe check every time a permissions check is performed before issuing a DB query. Likely what is happening is the data being fetched all at once, isn't being batched into a single or low number of requests, and instead is resulting in many DB calls hitting the limit.
It may be worth changing the debugMessages
query to be paginated rather than a fetch-all (it was only meant to be a temporary implementation detail anyway). If we build a query that matches behavior of things like the alerts
query, we can also re-use frontend code easier when it comes to graphs.