-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"key does not exist" after direct S3 upload #5
Comments
+1 We've been (sporadically) seeing this issue in our error tracker for months. Would love to have an official response. |
@ivobenedito While your error certainly seems easier to replicate, it's worth noting that this is also occurring without presigning (e.g. by copying to |
@pvande You're only getting this errors when using multiple file uploads, correct? I've replaced the data-url on the multiple file upload HTML form to submit directly to the rails app instead of going throw the asset host CDN and it all worked fine. |
@ivobenedito Incorrect; I'm actually seeing this error manifest on trivial codepaths. class Image < ActiveRecord::Base
attachment :key
end
Image.create(remote_key_url: image_url) # => Occasionally raises this error. |
@pvande Sorry, it's a different issue then. |
This is a tricky issue. The Amazon docs indicate that reads after writes should be consistent immediately:
See: http://docs.aws.amazon.com/AmazonS3/latest/dev/Introduction.html But it's unclear if this is also true for copy and move. I haven't been able to find any documentation to either effect. I guess we could always read the object instead of copying, but that seems also bad from a performance perspective. |
I feel like I can say with some confidence that their documentation is (at least in part) incorrect on that subject. Logging HTTP requests has yielded some data on the subject.
If there's any further data that it would be useful to capture, I'm happy to do so. EDIT: This specific exception may have originated inside my own code. Having said that, it is the same class of problem that we've been witnessing. |
Hey Guys, I'm also running into this issue, is there any solutions to this issue now? |
Can confirm this crops up occasionally on direct uploads for single files as well, most recently with a 20 KB image. |
Any updates on this issue? |
Also, requiring updates on this issue |
This issue might crop up elsewhere: I'm seeing occasional Given that That being said, AWS assert read-after-write consistency for all regions and all endpoints now. Most recently: https://forums.aws.amazon.com/thread.jspa?messageID=690666򨧪. I'll continuing to look in the app code to see if there's something wrong there (e.g. maybe the file was somehow deleted from the cache) - in the meantime flagging in in case it helps anyone else with the same error. |
Any updates on this issue? I can consistently reproduce this error, but it is not related to S3 consistency. In my model, if I have the following:
In my simple form, I have the following: I get "the specified key does not exist" exception. The file is clearly sitting there in the S3 store, but Refile is still trying to copy an invalid key that doesn't exist. If I remove the |
Closing to clean up my own issues. Can be re-opened if this is still an active problem. |
I'm running into issues with direct S3 uploads where the application is trying to save the model after the upload is complete but before the file upload has fully propagated across S3.
Is there any way to specify the number of retries or a timeout period when trying to copy from cache to store here https://github.com/refile/refile-s3/blob/master/lib/refile/s3.rb#L56?
The text was updated successfully, but these errors were encountered: