I have an application using rails 3.2 running on a hero and stored on S3. Users have the ability to upload photos that are processed using the carrier / MiniMagick for different sizes.
The problem that we see is that in 30% of cases the browser is turned off. The upload code (there are up to four images that can be uploaded) is as follows: I use carrierwave_backgrounder to delay image manipulation, but we still have timeouts. This is with fairly small images - usually 150 KB PNG.
mount_uploader :image1, ImageUploader process_in_background :image1 mount_uploader :image2, ImageUploader process_in_background :image2 mount_uploader :image3, ImageUploader process_in_background :image3 mount_uploader :image4, ImageUploader process_in_background :image4
This is the mistake we see
app[web.1]: Started POST "/offices" for 197.16.140.27 at 2013-05-23 23:32:18 +0000 app[web.1]: E, [2013-05-23T23:32:49.042937
The same thing happens with the subtle and the unicorn.
The reading I did suggests that I should upload directly to S3, but then the image processing is delayed, which is a problem for me (latency / complexity). What should I do differently?
source share