Last active
December 26, 2018 11:26
-
-
Save tvcam/2c5f2dc88fd6fa44cff8dcc87e2bc566 to your computer and use it in GitHub Desktop.
Don't use RMagick
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I worked for a client where I have to generate an image version to be display in frontend (old code use original image which size ~6MBx40images for a gallery). I added a new image version in ImageUploader class then run a background job to reprocess large version. The website keep crashing every 20mn, after the whole day debugging the job, debugging sidekiq, trying uncached query, result still the same. | |
After a whole day I found the issue, it caused by RMagick. I migrate to MiniMagick which is a replacement for RMagick. | |
https://github.com/minimagick/minimagick | |
"I was using RMagick and loving it, but it was eating up huge amounts of memory. Even a simple script would use over 100MB of RAM. On my local machine this wasn't a problem, but on my hosting server the ruby apps would crash because of their 100MB memory limit." | |
So choose a gem carefully! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment