-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
#reprocess! original images lost #1055
Comments
Can I see your |
heres the
After fixing the issue and having to find out exactly what images were lost, I've gathered a bit more info. For about half of the lost images, the S3 bucket had an original image with the original filename and a new 0kb image with a normalized file name. For the other half, it was only the 0kb image with normalized file name. I managed to duplicate that circumstance by attempting to copy an S3 object by just changing it's key name. This created the same circumstance of preserving the original and creating a 0kb file. As I mentioned, I was using delayed_paperclip and resque. A bunch of the delayed_paperclip jobs had dirty exits at one point, as usual in that situation, I just had the jobs rerun. I believe that somewhere in those dirty exits, the files were being copied from one filename to the other and were lost when the workers exited. Is there point in paperclip processing code where the original is being moved to where it could be deleted? Or, I guess, it could be more of a network communication problem and S3 just got cut off at an unfortunate moment. |
I've seen the exact same behaviour. In most cases, though, we've experiencing the original simply being deleted. What I've found out, is that when doing a From looking at the logs from our S3 bucket, it seems, that in some quite rare cases, the DELETE and PUT commands on S3 is not performed in the desired order. So the last thing getting executed, is the DELETE, and the file is lost. I've proposed a fix for this: Basically, it will preserve the files when reprocessing, hence, not doing the DELETE. |
👍 |
Having same problem here using Fog storage adapter with Rackspace. In my instance I call reprocess! but only on one style (Model.image.reprocess! :style). 2 times out of ten the original images goes missing. |
This: #1354 fixed my problem. |
I am currently having this issue where reprocess! deletes the original file (leaving a 0kb file remaining). I am using the most current version of paperclip. Here is my image.rb
|
We are having this issue too. Is it possible to reprocess single style only, and don't touch original version at all? |
Hi! `
` And I am running this through console: Please provide a solution or fix to this. |
I don't have a specific error narrowed down yet but I thought I should start the discussion.
In the midst of reprocessing several thousand images, I lost about 300-400 of them. I was using a resque job to iterate through my ActiveRecord objects and spinning off delayed_paperclip jobs to reprocess each one.
The odd part about this is that when they are 'lost', they still exist as a file in the original style but it's just a 0kb size file without any other styles processed. I was under the impression that reprocess wouldn't touch the original file.
Other pertinent information is that this is with the latest version of paperclip (3.3.0) and the images are being stored on S3
The text was updated successfully, but these errors were encountered: