Closed rachel3834 closed 9 months ago
Stern logs report the following error:
mop-b46f476df-rzgnw nginx 2024/01/02 22:01:35 [error] 7#7: *5988 upstream prematurely closed connection while reading response header from upstream, client: 10.100.32.218, server: _, request: "GET /prioritytargets/ HTTP/1.1", upstream: "http://127.0.0.1:8080/prioritytargets/", host: "mop.lco.global", referrer: "https://mop.lco.global/targets/"
Jashandeep reports seeing this error when the queryset returned is very large.
I've introduced a cap on the number of events that can be returned in response to the two queries performed for the priority targets page. This should ensure that the page loads before the browser timesout, and assumes a bad gateway error.
Since the returned target lists are already sorted into order of descending priority, this means we will always display the highest priority targets, but may not display some of the borderline targets if the number is high. The page also displays a warning for the user so that they know this is the case.
A better solution might be to paginate these tables.
MOP's priority targets page is currently not loading, and instead resulting in a 502 Bad Gateway error.