When running Bulk Coop Report, long load time and then snail no grow system error page displayed. Report not generated.

When customer Terra Nadra (2864) normally run this report monthly, the report generates almost immediately.
Report not generating at all, snail system error page displayed.
Can reproduce with multiple enterprises (1965, 119) and for a different/shorter date range (21/07 - 23/7).
No workaround
S2 - no workaround, hub requires report
bug-s1: a critical feature is broken: checkout, payments, signup, login
bug-s2: a non-critical feature is broken, no workaround
bug-s3: a feature is broken but there is a workaround
bug-s4: it's annoying, but you can use it
bug-s5: we can live with it, only a few users impacted
https://github.com/openfoodfoundation/openfoodnetwork/wiki/Bug-severity
-->
@chezaorchard were those steps to reproduce done as superadmin or as manager of an affected hub? Superadmins get many more results than a hub manager and so numbers can't be compared.
Does it work if they go day by day? are all the 4 report types failing equally or is this happening with a particular type?
I opened https://github.com/openfoodfoundation/openfoodnetwork/pull/5815 to mitigate this but there's no magic solution :man_shrugging: it will improve things a bit but that's all. Reports have a response time that grows linearly with the number of line items the hub has (more or less).
Yes if this happens as super admin, we cannot unfortunately spend time on it for now. But good candidate to be taken into account for the report work ping @lin-d-hop
Probably a data issue with one of the orders / line_items / variants. It's only affecting this specific hub and this specific date range, right?
Probably a data issue with one of the orders / line_items / variants. It's only affecting this specific hub and this specific date range, right?
It'd be great news if it was that.
When I logged the bug I was able to replicate the error for multiple hubs, and for different date ranges, including a single day.
I've logged in as the affected enterprise to attempt and replicate it again just now and the report is slow to generate but it is running.
Hello Chez! It's great to see you picking up some of the support work in AUS and raising issues in GH, thanks!
When I logged the bug I was able to replicate the error for multiple hubs, and for different date ranges, including a single day.
Re "I was able to replicate the error for multiple hubs", did you 1) run the report as super admin for multiple enterprises and could see the error or 2) did you login as those enterprises and hit the problem?
1) is not an S2.
2) could be an S2.
@luisramos0, I was logged in as super admin at the time - have taken on board your earlier comment re making sure I test logged in as actual enterprises - thank you! As above, the report seems to be running now for the affected enterprise. So, 1. is not an S2
It's still possible that there's an inconsistent line_item that makes the report crash but one that doesn't belong to this enterprise. However, if the enterprise manager can get the report again, I'd close the issue. We know performance is a major concern in reports and falls out of the scope of this issue IMO, although we improved noticeably already.
Yes let's close and reopen if we know a specific enterprise cannot reach the report again 馃憤
Most helpful comment
@luisramos0, I was logged in as super admin at the time - have taken on board your earlier comment re making sure I test logged in as actual enterprises - thank you! As above, the report seems to be running now for the affected enterprise. So, 1. is not an S2