Skip to content

Retry CMR granule searches on transient errors (429/5xx, no connection) - #64

Merged
SmithB merged 1 commit into
mainfrom
cmr_search_retry
Oct 16, 2026
Merged

SmithB merged 1 commit into
mainfrom
cmr_search_retry

Conversation

@SmithB

@SmithB SmithB commented Oct 16, 2026

Copy link
Copy Markdown
Owner

earthaccess.search_data raises on the first CMR error. Over 2026-10-13..16, 59 MAAP DPS jobs lost a tile to "502 Bad Gateway" from cmr.earthdata.nasa.gov/search, raised in find_ATL11_granules (38) and tilingSchema.resolve_files_for_box (24), in bursts (25 jobs in one hour). Every one of those tiles succeeded on its next attempt.

  • io_utils.search_data(**kwargs): earthaccess.search_data retried on HTTP 429/500/502/503/504 (read from the exception's __cause__, which is how earthaccess wraps them) and requests ConnectionError/Timeout, on the MAAP broker's schedule (10-60 s jittered pauses, 240 s budget, up to 6 tries). One stderr line per retry; anything else, or the last transient error, is raised unchanged.
  • find_ATL11_granules and resolve_files_for_box call it.
  • tests/test_cmr_retry.py (no network). Full suite: 336 passed (network tests deselected); live search through the wrapper returns the same 48 granules as a direct call.

Takes effect at the next ATL1415 registration (DPS installs pointCollection from main at build time).

🤖 Generated with Claude Code

earthaccess.search_data raises on the first CMR error.  Over 2026-10-13..16,
59 MAAP DPS jobs lost a tile to "502 Bad Gateway" from
cmr.earthdata.nasa.gov/search, raised in find_ATL11_granules (38) and
tilingSchema.resolve_files_for_box (24), in bursts; every one of those tiles
succeeded on its next attempt.  io_utils.search_data() retries those errors on
the MAAP broker's schedule (10-60 s jittered pauses, 240 s budget), prints one
stderr line per retry, and raises anything else -- or the last transient
error -- unchanged.  Both call sites now use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SmithB
SmithB merged commit 83b6d00 into main Oct 16, 2026
2 checks passed
@SmithB
SmithB deleted the cmr_search_retry branch October 19, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant