Storage errors
This guide helps you resolve common issues encountered while configuring storage in Plane. Each section includes potential causes and step-by-step solutions.
Bucket policy exceeds size limit
Error: An error occurred (PolicyTooLarge) when calling the PutBucketPolicy operation: Policy exceeds the maximum allowed document size.
This error occurs when the bucket policy exceeds the 20KB size limit allowed by MinIO. It typically happens when trying to add complex policies or when unnecessary data bloats the policy size.
To resolve this issue, define a streamlined bucket policy file and apply it within the MinIO container:
- Create a bucket policy JSON file
-
On your local machine, create a file named
bucket-policy.json
with the following content:{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": { "AWS": ["*"] },
"Action": ["s3:GetObject"],
"Resource": ["arn:aws:s3:::uploads/*"],
"Condition": {
"StringEquals": {
"s3:ExistingObjectTag/publicAccess": ["true"]
}
}
}
]
}
-
- Save this file in an accessible location.
- Set up and apply the policy
warning
IMPORTANT Execute all
mc
commands within the MinIO container (attach or usedocker exec
).
-
Configure MinIO alias:
mc alias set myminio http://plane-plane-minio:9000 <minio-username> <minio-password>
Replace
plane-plane-minio:9000
with your MinIO server address. -
Tag existing objects:
mc find myminio/uploads --exec "mc tag set {} publicAccess=true"
-
Copy the policy file to the MinIO container:
docker cp bucket-policy.json <minio-container-id>:/tmp
Replace
<minio-container-id>
with your MinIO container ID (find it withdocker ps
). -
Apply the policy to the bucket:
mc anonymous set-json /tmp/bucket-policy.json myminio/uploads
- Verification
- Verify that objects are correctly tagged:
mc tag list myminio/uploads/<object-name>
- Test public access:
curl http://<minio-server>:9000/uploads/<object-name>
Notes
- Ensure the
access-key
andsecret-key
used for the alias have adequate permissions to manage the bucket. - If your MinIO server is on a different machine or address, update the server URL accordingly.
- After applying the policy, test the setup to confirm it works as expected.