Skip to content

Archive generation fails for large datasets (S3 10,000 part limit) #180

Closed

Description

@neuromechanist

Problem

Archive generation for nm000103 fails with:

S3 Upload error: Part number must be an integer between 1 and 10000, inclusive
ArgumentValue: '10001'

Failed run: https://github.com/nemarDatasets/nm000103/actions/runs/22298008265

Root Cause

The generate-archive.yml workflow streams a zip archive to S3 using @aws-sdk/lib-storage with partSize: 10 * 1024 * 1024 (10MB). S3 multipart uploads have a hard limit of 10,000 parts, so the maximum archive size is ~100GB.

nm000103 (HBN-EEG) has 21,142 files. The resulting zip exceeded 10,000 parts at progress 9,500/21,142.

Fix

Increase partSize to handle larger datasets. Options:

Part Size Max Archive Size Tradeoff
10MB (current) ~100GB Too small
50MB ~500GB Good default
100MB ~1TB Safe for foreseeable datasets

Recommended: Use 100MB part size (100 * 1024 * 1024). Memory usage stays low since @aws-sdk/lib-storage buffers queueSize parts (4 x 100MB = 400MB), well within GitHub Actions' 7GB limit.

Alternatively, calculate dynamically based on estimated archive size.

Files to Change

  • .github/workflows/generate-archive.yml in nemarDatasets/.github (shared workflow) or per-repo copies
  • The inline stream-archive.js script, line: partSize: 10 * 1024 * 1024

Related

Closes #138 (streaming archive generation is implemented; this fixes the size limit)

Activity

  1. added a commit that references this issue on Feb 24, 2026
    1a15a04
  2. neuromechanist commented on Feb 24, 2026

    @neuromechanist
    ContributorAuthor

    Fixed in commit 1a15a04 (backend template) and deployed to all live dataset repos. Archive generation re-triggered for nm000103 and nm000104.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions