sidekiq + heroku + paperclip working very slowly

257 Views Asked by At

I am trying to debug a problem I have with sidekiq processing jobs in a slow manner, while on the development machine the jobs start immediatly and run fast

My config is saving the original image on S3, pulling it by the worker, process the styles and save them back in s3. The jobs eventually finish, when a job ends, the next job does not immediatly start, making processing a lot of images really slow.

This problem happens no matter how many sidekiq workers I start (tested from 1-20). I run imagemagick with -limit memory 64 -limit map 128 due to heroku's limited memory dynos.

The latest heroku cedar-14 has an imagemagick version that support multiple processing

Is there any special configuration I need to take into consideration when dealing with sidekiq + heroku + paperclip/imagemagick?

1

There are 1 best solutions below

2
On

Heroku's 1X dynos are quite slow, they don't have the luxury of an SSD or several cores, unlike your laptop. Use -c 3 and expect to wait or upgrade to a PX.