freelawproject / recap

This repository is for filing issues on any RECAP-related effort.
https://free.law/recap/
12 stars 4 forks source link

OperationalError caused by query timeout in the RECAP API. #363

Closed sentry-io[bot] closed 3 months ago

sentry-io[bot] commented 5 months ago

Sentry Issue: COURTLISTENER-62J

QueryCanceled: canceling statement due to statement timeout
  File "django/db/backends/utils.py", line 105, in _execute
    return self.cursor.execute(sql, params)
  File "psycopg/cursor.py", line 732, in execute
    raise ex.with_traceback(None)

OperationalError: canceling statement due to statement timeout
(24 additional frame(s) were not displayed)
...
  File "cl/recap/views.py", line 142, in list
    return super().list(request, *args, **kwargs)
  File "cl/api/pagination.py", line 37, in paginate_queryset
    self.page = paginator.page(page_number)

Filed by: @albertisfu

sentry-io[bot] commented 5 months ago

Sentry issue: COURTLISTENER-62F

mlissner commented 5 months ago

Well, at least one of these is for the following link (don't click it):

http://www.courtlistener.com/api/rest/v3/recap-query/?docket_entry__docket__court=tnwb&pacer_doc_id__in=%2C%2C

That says to return every recap entry in tnwb, which, yeah, we're going to time out when doing that.

This API is only used by the extension, so I think the fix for this is to make sure the extension doesn't send requests like that.

mlissner commented 5 months ago

Another one is:

http://www.courtlistener.com/api/rest/v3/recap-query/?docket_entry__docket__court=txsb&pacer_doc_id__in=%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C

Same idea, not good!

mlissner commented 3 months ago

We think these are fixed, but the issue is people using old versions of the extension. Therefore, I'm closing this and I'm reopening https://github.com/freelawproject/recap/issues/217 to boot people off old versions.