cds-snc / notification-planning

Project planning for GC Notify Team
4 stars 0 forks source link

Investigate report download query performance #1545

Open andrewleith opened 2 months ago

andrewleith commented 2 months ago

Describe the bug

When a service has more than 470k notifications in one week, the report download fails with a 504 - Endpoint request timed out thrown from API to ADMIN.

Notes:

Error as seen in New Relic: https://one.newrelic.com/nr1-core/errors-inbox/entity-inbox/MjY5MTk3NHxBUE18QVBQTElDQVRJT058MjgzNDY5MDYx?account=2691974&begin=1713363600000&end=1713367560000&state=b0664a13-e152-bfe2-1cb2-e2589bbe21f2

Related fresh desk ticket: https://cds-snc.freshdesk.com/a/tickets/17194

Bug Severity

SEV-3 (SEV-1 Critical, SEV-2 Major, SEV-3 Minor, SEV-4 Low)

Acceptance criteria

To Reproduce

Steps to reproduce the behavior:

  1. Go to the dashboard of a service with more than 500k notifications for the week
  2. Click on Emails sent tile
  3. Click Download this report
  4. See error

Expected behavior

Report should download successfully

Impact

Describe overall user/system impact to consider when prioritizing this issue.

If applicable

Impact on Notify users:

Impact on Recipients:

Impact on Notify team:

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.