The report page crashes at 50k records

Created on 11 April 2025, 14 days ago

Problem/Motivation

While this could be a relatively rare occasion, if the site moderator forgets to check and cleanup reports and once the records count reaches ~50k the report page crashes due to memory exhaustion issue.

My production site has 300s execution time, 512MB memory limit 256MB OPcache and can't show a report containing 50k+ reports.

Steps to reproduce

Just generate somehow 50k helpfulness records.

Proposed resolution

Implement either pagination AND/OR time frame selection (just like banks do on their transaction reports), or add auto trim option to drop earlier submissions...

πŸ› Bug report
Status

Active

Version

2.1

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States euk

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @euk
  • πŸ‡¬πŸ‡§United Kingdom aaron.ferris

    Perhaps an admin configurable 'expiry time' setting, where we automatically trim items that are older than 'x'?

  • πŸ‡ΊπŸ‡ΈUnited States euk

    I am working on refactoring of the report page. It is a bit sub-optimal from the coding and usability perspective:
    - Instead of looping trough results to convert each of them into an array, PDO::FETCH_ASSOC could be used to get results as arrays in the first place.
    - from the usability perspective, unlikely anyone is interested too see hundreds results on a single page
    - it needs a pager paging
    - it needs filters - no way to only see results you need
    - the results are split into two tables, where it should be one table with filters
    - etc.

    It is easier to refactor and get a good UI.

  • πŸ‡ΊπŸ‡ΈUnited States euk
  • πŸ‡ΊπŸ‡ΈUnited States euk
  • πŸ‡ΊπŸ‡ΈUnited States euk

    I refactored the report page a bit:
    - Added automated Pagination and Sort/Order support via PagerSelectExtender and TableSortExtender
    - Added limit to display 25 records per page,
    - refactored and cleaned up the code a bit.

    This is ready for review and testing.

    I am going to create another ticket for adding filtering support.

  • πŸ‡ΊπŸ‡ΈUnited States euk

    I have changed the ticket from the bug report to feature request. MR7 now contains full refactoring including filters. MR6 contains only report refactoring for performance.

Production build 0.71.5 2024