ustaxcourt / ef-cms

An Electronic Filing / Case Management System.
https://dawson.ustaxcourt.gov/
Other
85 stars 46 forks source link

BUG: Some cases don't load when searching for them in the admin #702

Open mmarcotte opened 3 years ago

mmarcotte commented 3 years ago

Describe the Bug

When searching for some cases in the admin, no results are returned. In fact the request fails without the server returning a response code. Case 15975-14 is an example in the Test and Migration environments.

Nothing obvious is logged to help troubleshoot.

This is a large case with many docket entries.

It works in Production, which hasn't had PDFs scraped.

Business Impact/Reason for Severity

Court users need to be able to work with existing cases

In which environment did you see this bug?

Court migration and test

Who were you logged in as?

Floater

What were you doing when you discovered this bug? (Using the application, demoing, smoke tests, testing other functionality, etc.)

Looking up a case by docket number

To Reproduce

Steps to reproduce the behavior:

  1. Log in to Test or Migration
  2. Search for 15975-14

Expected Behavior

The case exists, and it should be found.

Actual Behavior

The UI responds with:

No Matches Found Check your docket number and try again. Or you can try searching by name.

The network request fails with no status code returns. Perhaps it's running out of memory?

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Cause of Bug, If Known

Possible causes is that it's requesting all of the contents of the PDFs from ES. This is causing the Lambda to OOM. The request fails without having a chance to respond.

Process for Logging a Bug:

Severity Definition:

FOR ENGINEERING TEAM ONLY Bug Resolution Steps:

adunkman commented 3 years ago

Log indicates the response finished successfully (statusCode 200):

{
    "environment": {
        "color": "green",
        "stage": "mig"
    },
    "request": {
        "headers": {
            "accept": "*/*",
            "host": "api-green.mig.ef-cms.ustaxcourt.gov",
            "user-agent": "curl/7.64.1",
            "x-amzn-trace-id": "Root=1-5fe24429-346b04634e181ce03d3b1ae7",
            "x-forwarded-for": "73.200.234.126",
            "x-forwarded-port": "443",
            "x-forwarded-proto": "https",
            "content-length": "4",
            "connection": "close"
        },
        "method": "GET",
        "url": "/cases/15975-14"
    },
    "requestId": {
        "apiGateway": "2f216c11-da7f-4f8f-92f0-f1d30e0f653e",
        "applicationLoadBalancer": "Root=1-5fe24429-346b04634e181ce03d3b1ae7",
        "lambda": "52352110-d276-4082-b0bf-3e7d1f1a351f"
    },
    "user": {
        "entityName": "User",
        "email": "adc1@dawson.ustaxcourt.gov",
        "name": "Test adc1",
        "role": "adc",
        "userId": "015b2b6d-f716-4835-8605-7e375971bc26"
    },
    "response": {
        "responseTimeMs": 7145,
        "statusCode": 200
    },
    "level": "info",
    "message": "Request ended: GET /cases/15975-14"
}

… and immediately afterward:

[ERROR] [1608664112721] LAMBDA_RUNTIME Failed to post handler success response. Http response code: 413.
adunkman commented 3 years ago

Looks like there is a 6MB cap on payloads.

adunkman commented 3 years ago

Note: this is happening in test and migration, not production. Appears to be related to the documentContents.

adunkman commented 3 years ago

To reproduce, requires environment that has documentContents, which Flexion is blocked from getting until #682.

mmarcotte commented 3 years ago

workaround:

adunkman commented 3 years ago

No longer happening in migration due to document contents no longer being present there.