Closed J-Gonzalez closed 8 years ago
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: https://github.com/aws/aws-sdk-js/issues/656
@J-Gonzalez,
A few thoughts here:
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.
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.
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
@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.
Closing due to inactivity.
After running the app for a few hours on Heroku, we start seeing a ton of request timeouts, and eventually start using up a ton of memory on Heroku.