Skip to content

503 Service Unavailable due to CMR Payload Too Large #2771

@jhkennedy

Description

@jhkennedy

Jira: https://asfdaac.atlassian.net/browse/TOOL-3721

Note: The above link is accessible only to members of ASF.


When attempting to submit jobs like:

jobs = sdk.Batch()
for batch in sdk.util.chunk(prepared_jobs):
    jobs += hyp3.submit_prepared_jobs(batch)

I kept getting these errors:

requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: https://hyp3-jhk-sandbox.asf.alaska.edu/jobs
hyp3_sdk.exceptions.ServiceUnavailableError: <Response [503]> Could not submit jobs due to a CMR error. Please try again later.

However, there was no CMR outage at the time. Looking at the API logs, _get_cmr_metadata is raising this error:

CMR search failed: 413 Client Error: Payload Too Large for url: https://cmr.earthdata.nasa.gov/search/granules.json

Since validate_jobs is gathering all the granules from all the jobs, the payload can exceed the CMR limit.

We should:

  • Return a descriptive error in this case
  • Batch queries to CMR to stay under the limit

Metadata

Metadata

Assignees

No one assigned

    Labels

    Jira BugCreate a Jira Bug for this issuebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions