[Mongrel] RMagick=bad, ???=good
mongrel at philip.pjkh.com
Fri Dec 15 15:04:26 EST 2006
> I know that Zed has made mention of the fact that using RMagick with
> mongrel and rails is a bad thing. I'm currently using FlexImage (which
> in turn uses RMagick) on my application and really haven't had too
> many problems. We get a restart for memory usage every 8-10 hours on
> one mongrel of twelve running, but I'm not sure if that's an RMagick
> issue. Either way, I'd like to make my system better if I can.
> Right now I've got controllers that are using both send_data (sending
> image stored in the db, using RMagick to crop/resize before sending)
> and send_file (sending a static image on the site that needs to be
> sent inline). Image upload is being handled by FlexImage, which will
> save the image to the DB, resizing it to 640x480 before saving if it's
> too big.
> My question is, what then is the preferred method of doing image
> manipulation while running mongrel?
> Convert FlexImage to use mini-magick?
> Create a custom system to offload the image processing to another process?
> If someone can provide some insight or examples, it would be appreciated.
Just to add to what others have said there is also the GD2 library and if
you're willing to shell out, netpbm. Although I would imagine GD2 has the
same potential for memory leaks as ImageMagick if I understand the issue
correctly (that is ruby not knowing about memory allocated by the
We use rmagick now, but don't upload that many images (admin interface
only). My last job (not Rails, but that doesn't matter) we shelled out to
netpbm for a couple of reasons -- we were dealing with a lot of arcane
formats (PCX with specific header formats) and because I'd run some tests
converting/scaling images using GD, ImageMagick, and netpbm and netpbm
seemed to do the best job and delivery the smallest file.
Now... that was about six years ago so things may certainly have changed.
More information about the Mongrel-users