thoughtbot/paperclip — Issue #764: huge memory leaking when set :command_path option
Author: brutuscat
Created: 2012-03-01 19:33:42+00:00
State: open

HI, I'm having this weird issue, that while I workarounded it, drove me crazy for some days.

I'm running Rails 3.2.1 with the latest ImageMagick. I'm using Zbatery and because I can't use too much memory I'm running my Rake tasks in a special secured controller, this way I keep my memory low running with threadsafe! option and one Rails environment always.

The issue was that when trying to refresh the styles I noted a huge leak of memory. I mean huge, from 70mb to 300mb after processing 100 images or so. I've tried everything, until I removed some Paperclip options like these:

```
# Paperclip.options[:swallow_stderr] = false
# Paperclip.options[:command_path] = "/home/myuser/bin"
# Paperclip.options[:log] = true
# Paperclip.options[:log_command] = true
```

After removed those the leak was gone!