Git Product home page Git Product logo

Comments (6)

J-Gonzalez avatar J-Gonzalez commented on August 22, 2024

The 'Memory Quota Exceeded' could be due to the fact that we are buffering the entire objects into memory, and with a ton of images being generated, this would add up quickly - not sure if something like this would help: aws/aws-sdk-js#656

from image-resizer.

jimmynicol avatar jimmynicol commented on August 22, 2024

@J-Gonzalez,

A few thoughts here:

  • are you running behind a CDN? much of the premise of this app is lost when no CDN is used.
  • from the logs it looks like you are using a 1X dyno which may not be sufficient if your source images are very large.
  • so very early on the code was attempting to stream objects as opposed to buffering them to memory but it turned out that gm was simply buffering them anyway and sharp may do something similar as some of the operations require all of the image to be used.

It is possible there could be a memory leak in the code, but my first guess is that you are asking the simple dyno to do too much work. Try scaling to a 2X and see if things improve, but as I said it is fairly dependant on your source images.

from image-resizer.

J-Gonzalez avatar J-Gonzalez commented on August 22, 2024

Scaling it to 2X did seem stop memory leaks. The app does climb to about 700MB of memory usage but doesn't seem to go above that.
image

from image-resizer.

lovell avatar lovell commented on August 22, 2024

Hello, you may want to reduce the size of libvips' operation cache on memory-constrained systems - see http://sharp.dimens.io/en/stable/api/#sharpcachememory-items

from image-resizer.

jimmynicol avatar jimmynicol commented on August 22, 2024

@lovell, thanks again for the input.

@J-Gonzalez if you can give this a go I would love to hear the results. image-resizer is designed to have the most sensible defaults for most cases and it sounds like setting appropriate cache sizes should be one of them.

from image-resizer.

jimmynicol avatar jimmynicol commented on August 22, 2024

Closing due to inactivity.

from image-resizer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.