ocis icon indicating copy to clipboard operation
ocis copied to clipboard

Downloading multiple files results in 4 bytes download.zip when download.zip is around 2 GB and above

Open vishalaswanispark opened this issue 9 months ago • 2 comments

Describe the bug

On OCIS Web, when selecting multiple files for download, the resulting download.zip file is only 4 bytes instead of the expected size (e.g., around 2 GB or more).

Steps to reproduce

  1. Create four dummy files of sizes 0.5 GB, 1 GB, 2 GB, and 3 GB.
  2. Upload them via OCIS Web.
  3. Downloading a single file works without issues, regardless of its size.
  4. Selecting multiple files for download.
    • If their total size is below 2 GB, the download.zip is created and downloads successfully.
    • If their total size is around or above 2 GB, the download.zip appears to be created but results in a 4-byte file when downloaded.

Expected behavior

We should be able to download multiple files regardless of the total size of download.zip.

Actual behavior

When selecting multiple files for download:

  • If the total size is below 2 GB, the download.zip downloads correctly.
  • If the total size is around or above 2 GB, the download.zip is created, but the downloaded file is only 4 bytes.

Setup

  • OCIS Version: 6.6.1
  • Deployment: Running OCIS as a Docker container in a Docker Swarm
  • Authentication: Managed via Keycloak
  • URL Exposure: Through Traefik running on the Swarm manager
  • Deployment Details:
    • Multiple OCIS containers running in Swarm
    • Configuration & Metadata: Stored on a POSIX device
    • Data Blobs: Stored in an S3 bucket
    • Deployment Method: OCIS servers deployed as Docker stacks via individual docker-compose files

Startup command:

    entrypoint:
      - /bin/sh
    command: ["-c", "ocis init || true; ocis server"]

OCIS configuration

      OCIS_URL: "https://xyz.abc.com"
      OCIS_LOG_LEVEL: "info"
      OCIS_LOG_PRETTY: "true"
      OCIS_LOG_COLOR: "true"
      PROXY_TLS: "false"
      KEYCLOAK_DOMAIN: auth.abc.com
      OCIS_INSECURE: "true"
      
      # Keycloak IDP specific configuration
      PROXY_AUTOPROVISION_ACCOUNTS: "true"
      PROXY_ROLE_ASSIGNMENT_DRIVER: "oidc"
      PROXY_ROLE_ASSIGNMENT_OIDC_CLAIM: realm_access.roles
      OCIS_OIDC_ISSUER: https://auth.abc.com/realms/abc
      PROXY_OIDC_REWRITE_WELLKNOWN: "true"
      WEB_OIDC_CLIENT_ID: ocis-web
      GRAPH_LDAP_SERVER_WRITE_ENABLED: "true"
      PROXY_USER_OIDC_CLAIM: "preferred_username"
      PROXY_USER_CS3_CLAIM: "username"
      OCIS_EXCLUDE_RUN_SERVICES: "idp"
      GRAPH_ASSIGN_DEFAULT_USER_ROLE: "false"
      GRAPH_USERNAME_MATCH: "none"

      # Activate s3ng storage driver
      STORAGE_USERS_DRIVER: "s3ng"
      # keep system data on ocis storage
      STORAGE_SYSTEM_DRIVER: "ocis"

      # s3ng Wasabi S3 config
      STORAGE_USERS_S3NG_ENDPOINT: "https://s3endpoint.com"
      STORAGE_USERS_S3NG_REGION: "us-west-1"
      STORAGE_USERS_S3NG_ACCESS_KEY: "ACCESS_KEY"
      STORAGE_USERS_S3NG_SECRET_KEY: "SECRET_KEY"
      STORAGE_USERS_S3NG_BUCKET: "BUCKET_NAME"

      STORAGE_USERS_S3NG_PUT_OBJECT_DISABLE_MULTIPART: "false"
      STORAGE_USERS_S3NG_PUT_OBJECT_NUM_THREADS: 48
      STORAGE_USERS_EVENTS_NUM_CONSUMERS: 48
      STORAGE_USERS_S3NG_PUT_OBJECT_PART_SIZE: 549755813

      # Quota defaults
      OCIS_SPACES_MAX_QUOTA: 0
      GRAPH_SPACES_DEFAULT_QUOTA: 0
      FRONTEND_MAX_QUOTA: 0
      FRONTEND_UPLOAD_MAX_CHUNK_SIZE: 26214400

      # Max number of concurrent go-routines
      STORAGE_USERS_S3NG_MAX_CONCURRENCY: 100

      # Archiver limits for downloading zip/tar files
      FRONTEND_ARCHIVER_MAX_NUM_FILES: 10000
      FRONTEND_ARCHIVER_MAX_SIZE: 5497558138880

      # Enable asynchronous uploads with x processors
      STORAGE_USERS_OCIS_ASYNC_UPLOADS: "true"

      # Don't require passwords for public links
      OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD: "false"

      # Empty trash after 90 days
      STORAGE_USERS_PURGE_TRASH_BIN_PERSONAL_DELETE_BEFORE: 2160h0m0s
      STORAGE_USERS_PURGE_TRASH_BIN_PROJECT_DELETE_BEFORE: 2160h0m0s

      PROXY_CSP_CONFIG_FILE_LOCATION: /etc/ocis/csp.yaml

      # Path to metadata stored on POSIX
      STORAGE_USERS_S3NG_ROOT: /home/ocis/.ocis/storage/users

      OCIS_CONFIG_DIR: /etc/ocis
      OCIS_BASE_DATA_PATH: /var/lib/ocis

Additional context

We enabled debug logging but no errors reported for the entire download period.

vishalaswanispark avatar Mar 12 '25 14:03 vishalaswanispark