New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RMagick, Paperclip, S3 Silent Failing #338
Comments
Until recently, Paperclip was wholly incompatible w/ sidekiq due to one of its dependency not being thread-safe. See this issue, Sidekiq #310, and the Problems and Troubleshooting section of the wiki for more details. |
No log output or exceptions? Are you using sidekiq 2.1.1? |
Yes, I just upgraded. From the worker log I have: 2012-08-07T23:58:46+00:00 app[worker.1]: 2012-08-07T23:58:46Z 2 TID-1gmr4k DEBUG: enqueued schedule: {"retry":true,"queue":"default","backtrace":true,"class":"QrGeneratorWorker","args":[450],"at":1344383921.8842878} Then nothing else. |
Additonally, I thought it may have been due to the transaction not completing before the job is ran, so I have added both after_commit on: :create as well as delaying the job by 5 seconds to no success. |
Looks like postgres. I'm starting to wonder about the postgres driver. You using the |
Yes, both locally and heroku |
I just tried wrapping it in a Mutex with no success either |
I would try rescuing Exception in your |
What does |
PG.threadsafe? = true I caught the exception: "stack level too deep" qr = Magick::Image.read(self.big_qr).first Googling around led me to believe this is a RMagick configuration issue... but if the only variable in my setup that I'm changing is using Sidekiq, that leads me to believe otherwise? Is there anything in sidekiq that could cause this? |
In my gemfile: gem 'rmagick', require: false In the Model class the method is called from: require 'RMagick'
class EventPromoter < ActiveRecord::Base edit: just tried removing the require, still the same error. |
Have you tried replacing RMagick with MiniMagick? I've always had good luck |
Interesting suggestion... I tried it out, and it works beautifully. Thanks for the tip - reduced memory footprint and slug size |
Ok, I'm going to put RMagick on our "troublesome gems" list. |
@mperham can you put RMagick on the "troublesome gems" list 😉 |
I've got an Rmagick script that basically generates an image and saves it to paperclip. It was working fine with Resque.
Setup: Heroku, Unicorn
I can actually sometimes get it process locally if I manually add the job via console. But it always fails on Heroku whether it was added via console or not.
When it fails, it does not add it to the retry queue.
here is what my script looks like:
end
The text was updated successfully, but these errors were encountered: