Locally, the upload works fine.
On the deployed version, I could upload a small image (45kb). Meaning, my env variables are set correctly.
But when I use one with 600kb for example, I get a 504 Gateway Timeout with following message:
Error
We encountered an error when trying to load your application and your page could not be served. Check the logs for your application in the App Platform dashboard.
upstream_reset_before_response_started{connection_termination} (503 UC)
App Platform failed to forward this request to the application.
On Bulk uploads I get
Error
We encountered an error when trying to load your application and your page could not be served. Check the logs for your application in the App Platform dashboard.
no_healthy_upstream (503 UH)
App Platform failed to forward this request to the application.
The runtime logs don't show any error.
Server stats
- CPU peaks at 15%
- Memory peaks at 60%
Configuration
- I use payload 3.28.1 (all packages have the same version)
- Max upload size is set to 3MB on my S3 Bucket and in my collection.
Code snippets
// payload.config.ts
s3Storage({
collections: {
media: {
disablePayloadAccessControl: true,
generateFileURL: (doc) => {
return `${env.S3_PUBLIC_BASE_URL}/${env.S3_BUCKET}/${doc.filename}`
},
},
},
bucket: env.S3_BUCKET,
config: {
forcePathStyle: true,
credentials: {
accessKeyId: env.S3_ACCESS_KEY_ID,
secretAccessKey: env.S3_SECRET_ACCESS_KEY,
},
region: env.S3_REGION,
endpoint: env.S3_ENDPOINT,
},
}),
I'm not sure how to debug this. Any idea?