Skip to content

feature: Implement automatic retries for transient download failures #132

Backlog

Description

@m1ci

Description

During the December 2026 DBpedia KG Catalog download test, several knowledge graph downloads (MLSea-KG, MAKG and OpenCitations Meta) failed due to connection timeouts on Zenodo.

The Databus Client terminated the entire group download after encountering the following error:

Error: Could not connect to zenodo.org: the request timed out.

A subsequent HTTP HEAD request to the affected MLSea-KG file returned 200 OK, suggesting that the failure was temporary.

Proposed improvement

  • Automatically retry downloads following transient network errors, connection timeouts and temporary server errors.
  • Introduce a configurable maximum number of retry attempts.
  • Use exponential backoff between retry attempts.
  • Record retry attempts and their outcomes in the download log.

This would improve the reliability of automated downloads and reduce the need for manual intervention.

Activity

  1. added
    enhancement
    on Dec 4, 2026
  2. ANIRUDDH-001 commented on Dec 5, 2026

    @ANIRUDDH-001

    Proposal: wrap downloads in a retry loop (exponential backoff with jitter) for timeouts, connection errors and 429/5xx, configurable via --retries / --retry-backoff (default 3), keeping per-file failures from aborting the whole group download (report them at the end). Tests with mocked responses. I can open a PR if this direction works for you.

    Update: I just noticed #92 already implements a configurable retry strategy with exponential backoff, which covers most of this. I don't want to duplicate it, so I'm happy to help test or review #92, and I'll focus on #133 (resuming interrupted downloads) instead.

  3. saicharan13245-ship-it commented on Dec 5, 2026

    @saicharan13245-ship-it
    Contributor

    Thanks for flagging #92, @ANIRUDDH-001. Could you confirm whether you saw sections of #92 that cover file downloads?

    From reviewing #92 it only covers deploy, delete, and fetch_databus_jsonld—it doesn't add retry configuration to databusclient download or wrap the HEAD/GET file download requests in _download_file. In addition, it uses urllib3.util.Retry, which will not catch mid-stream or truncated download failures, nor log each retry attempt and its outcome in the download log as requested here.

    I was working on the feature #132 that wraps _download_file with exponential backoff, --max-retries, mid-stream/truncated download handling, and retry logging, and I'm about ready to open a PR. I'll go ahead and open the PR and try to see how it differs from #92.

  4. ANIRUDDH-001 commented on Dec 5, 2026

    @ANIRUDDH-001

    You're right, @saicharan13245-ship-it. I only looked at #92 at a high level, and it doesn't wrap _download_file or add retry options to databusclient download. Please go ahead with #137 for this one. I'll take #133 (resume) on top of your retry loop once #137 lands, so the two changes don't conflict in download.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions