Stack level too deep when using carrierwave versions

你离开我真会死。 提交于 2019-11-30 12:48:37

It turned out, that it's a carrierwave's fault (well, actually, osx fault). Thread with explanation: https://github.com/carrierwaveuploader/carrierwave/issues/1330

Solution:

gem 'rmagick', :require => 'RMagick'

i would target the for loop in your worker.

for i in 1..(frames_to_extract)

you're not incrementing i but you seem to be doing an indexed loop. I would switch it to use enum and each_with_index.

Rubyists tend to avoid the for loop as its a nasty mess.

  1. check your models, see if you have got an after_save hook for example which would regress into an infinite loop if you update the record in that hook - it's possible you've got an after_save which creates the job to make thumbnails and then storing those thumbnails initiates another job
  2. check for thread-safety issues, are any of the gems you are using listed here
  3. check your stack trace, can you see which lines are repeating?
  4. is the error present when you're not using sidekiq to process the files?
  5. does the problem happen always or just under load?
  6. RMagick bug with Ruby 2.1 - https://github.com/rmagick/rmagick/issues/100
  7. ...
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!