-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
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:
- Setting the
dapr.io/max-body-sizeannotation on the pod - Restarting the pod to apply the new configuration
- Verifying the annotation is correctly applied to the pod
Steps to Reproduce
- Deploy a DAPR-enabled application with Minio binding configured
- Add the following annotation to the pod specification:
annotations: dapr.io/max-body-size: "64Mi" # or "32Mi"
- Restart the pod to apply the configuration
- Attempt to fetch a file larger than 4MB (e.g., 10-50MB) using the Minio binding GET operation
- 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"ordapr.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 4MiMinio 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-sizeannotation 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-sizeflag
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
- ✅ Set
dapr.io/max-body-sizeannotation - Did not work - ✅ Restarted pod after applying annotation - Did not work
- ✅ 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
- DAPR Arguments and Annotations Documentation
- Related to deprecated flag:
--dapr-http-max-request-size - Current annotation:
dapr.io/max-body-size