Memory leak from media upload (Heroku + S3)

System Information
  • Strapi Version: 4.3.8
  • Operating System: Ubuntu 22.04 LTS
  • Database: Heroku PostgreSQL
  • Node Version: >=14.19.1 <=16.x.x
  • NPM Version: >=6.0.0

Uploading a few images crashes our production Strapi instance. From what I’ve read, this may be due to the way memory is managed in node on this platform, specifically with regards to Buffer objects, which seem to be used by the strapi-provider-upload-s3 plugin.

This is a deployment killer and we will be looking for a more stable CMS solution despite having invested months adopting Strapi across multiple teams and projects.

Sorry to hear this, i think it’s more of a nodeJS issue that you are saying. Bear in mind you can take the plugin and just rework it plug the wholes etc.

I think since NodeJS and JS itself is single threaded I think you will have the same issue regardless.
If you are trying to upload images from one server to a bucket, make sure the server or container has enough resources to deal with the request etc as well.

Though I do understand that this can be a deployment killer if you are doing uploads at the start of the container etc.