Skip to content

Minio Binding Fails to Fetch Files Larger Than 4MB Despite dapr.io/max-body-size Annotation #9177

@jukhancisco

Description

@jukhancisco

Minio Binding Fails to Fetch Files Larger Than 4MB Despite dapr.io/max-body-size Annotation

Issue Description

The Minio binding component fails to retrieve files larger than 4MB even after setting the dapr.io/max-body-size annotation on the pod. The DAPR sidecar continues to enforce the default 4MB limit despite the annotation being applied and the pod being restarted.

DAPR Version

Latest Release: v1.16.1 (as of October 2025)

Expected Behavior

When the dapr.io/max-body-size annotation is set to a value larger than the default 4MB (e.g., 32Mi or 64Mi), the DAPR sidecar should honor this configuration and allow fetching files up to the specified size limit from the Minio binding.

Actual Behavior

The DAPR sidecar continues to reject requests for files larger than 4MB with a "Request body too large" error, despite:

  1. Setting the dapr.io/max-body-size annotation on the pod
  2. Restarting the pod to apply the new configuration
  3. Verifying the annotation is correctly applied to the pod

Steps to Reproduce

  1. Deploy a DAPR-enabled application with Minio binding configured
  2. Add the following annotation to the pod specification:
    annotations:
      dapr.io/max-body-size: "64Mi"  # or "32Mi"
  3. Restart the pod to apply the configuration
  4. Attempt to fetch a file larger than 4MB (e.g., 10-50MB) using the Minio binding GET operation
  5. Observe the error: "Request body too large"

Environment Details

  • DAPR Runtime Version: v1.16.1 (latest)
  • Component: Minio Binding (bindings.minio)
  • Operation: GET (fetch/retrieve file)
  • File Size: Between 10-50 MB
  • Platform: Kubernetes
  • Annotation Used: dapr.io/max-body-size: "32Mi" or dapr.io/max-body-size: "64Mi"

Configuration

Pod Annotations

metadata:
  annotations:
    dapr.io/enabled: "true"
    dapr.io/app-id: "my-app"
    dapr.io/max-body-size: "64Mi"  # Attempting to increase from default 4Mi

Minio Binding Component (example)

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: minio-binding
spec:
  type: bindings.minio
  version: v1
  metadata:
    - name: endpoint
      value: "minio-service:9000"
    - name: accessKey
      value: "minioadmin"
    - name: secretKey
      value: "minioadmin"
    - name: bucket
      value: "my-bucket"
    - name: useSSL
      value: "false"

Additional Context

According to the DAPR documentation:

  • The dapr.io/max-body-size annotation should increase the request max body size to handle large file uploads using HTTP and gRPC protocols
  • Default value is 4Mi
  • The annotation replaced the deprecated --dapr-http-max-request-size flag

However, this annotation appears to not be respected by the DAPR sidecar when using the Minio binding component for file retrieval operations.

Possible Root Cause

The annotation may only be applied to the HTTP/gRPC server endpoints that receive requests TO the sidecar, but not to outbound requests made BY the sidecar when fetching data from components like Minio. This would explain why the 4MB limit persists even with the annotation set.

Workarounds Attempted

  1. ✅ Set dapr.io/max-body-size annotation - Did not work
  2. ✅ Restarted pod after applying annotation - Did not work
  3. ✅ Tried different values (32Mi, 64Mi) - Did not work

Impact

This issue prevents using DAPR's Minio binding for any use case involving files larger than 4MB, which is a significant limitation for:

  • File storage and retrieval systems
  • Document management applications
  • Data processing pipelines
  • Backup and restore operations
  • Media file handling

Requested Fix

The dapr.io/max-body-size annotation should be honored for all component operations, including:

  • Outbound requests to component backends (like Minio)
  • Response body size from components
  • Both upload (POST/CREATE) and download (GET) operations

Alternatively, if the annotation is only intended for inbound requests, a new annotation or configuration option should be added specifically for component binding operations (e.g., dapr.io/component-max-response-size).

References

Metadata

Metadata

Assignees

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