delayed_paperclip
delayed_paperclip copied to clipboard
Error after processing a lot of images
I use delayed_paperclip with Sidekiq on Ruby 2.1.2. First jobs are being processed as they should, but after a while things go south. Here's a copy of one of those errors:
https://gist.github.com/datenimperator/e90ff264d203e56a3905
Restarting Sidekiq will return to processing more jobs until it will eventually start to fail again. I'm not sure what's going on: There is an old Paperclip issue #722 which looks pretty the same but refers to Paperclip 2.7.x, I'm on 4.2.0 now.
Any help is greatly appreciated.
Hmm. I'm seeing
Argument list too long - identify -format '%wx%h,%[exif:orientation]' '/var/folders/f3/j05ygbhx6cx4ykwbdv6m5nbh000101/T/2e309f3244e197b93dc741957dc7fa1520140830-36512-108qunp.jpg[0]' 2>/dev/null
Can you paste your paperclip configuration from your model?
Sure. Here you go:
# == Schema Information
#
# Table name: product_images
#
# id :integer not null, primary key
# product_id :integer
# created_at :datetime
# updated_at :datetime
# image_file_name :string(255)
# image_content_type :string(255)
# image_file_size :integer
# image_updated_at :datetime
#
# Indexes
#
# index_product_images_on_product_id (product_id)
#
class ProductImage < ActiveRecord::Base
belongs_to :product, counter_cache: true
has_attached_file :image,
:default_url => "/images/:style/missing.png",
:default_style => :small,
:styles => {
:xlarge => "1080x720>",
:large => "360x240>",
:small => "156x117#",
:thumb => "70x52#"
},
:convert_options => {
:all => "-strip -depth 8"
}
validates_attachment_presence :image
validates_attachment :image,
content_type: { content_type:%w{image/jpg image/jpeg image/png image/gif} }
process_in_background :image
end