Skip to content

Give each scene source its own download timeout - #231

Open
chris-thomas-ga wants to merge 2 commits into
GeoscienceAustralia:mainfrom
chris-thomas-ga:fix/per-source-scene-download-timeout
Open

chris-thomas-ga wants to merge 2 commits into
GeoscienceAustralia:mainfrom
chris-thomas-ga:fix/per-source-scene-download-timeout

Conversation

@chris-thomas-ga

Copy link
Copy Markdown
Contributor

Description

The 60 minute download timeout covered the whole preference list. On timeout it dropped the first source in the list rather than the one that was actually stuck. So if AUS_COP_HUB failed quickly and ASF hung, ASF got retried and a job could sit there for two or three hours. Terminating the pool also left the pygssearch download running in the background.

Each source now runs in its own process with its own timeout, and the next source is tried when it times out. The process runs in its own process group so the pygssearch subprocesses get killed with it, and any partial zip that attempt created is removed (an existing .SAFE is left alone). Adds --scene-download-timeout-mins (default 60) to the CLI and run script. Exit code 102 is unchanged.

Testing

tests/sar_pipeline/test_scene_download_timeout.py uses fake sources that hang or fail (about 12s to run). Not tried against real downloads yet.

Type of change

  • Bug fix

chris-thomas-ga and others added 2 commits November 24, 2026 07:38
Previously one timeout covered the whole preference list and, on timeout,
the first source was dropped and the rest retried, so a stalled later
source could be retried and the pygssearch subprocess was left running.

Each source now runs in its own forked process group with its own
timeout (--scene-download-timeout-mins, default 60). On failure or
timeout the process group is killed, partial files created by the
attempt are removed and the next source is tried. Exit code 102 is kept
for the case where all sources fail and at least one timed out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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