-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
get_object is broken in case of concurrent execution. #17
Comments
Interesting, I will take a look. On Mon, 21 Dec 2015 at 09:12 Oleg Selivanov notifications@github.com
|
My be problem is related to this issue: aio-libs/aiohttp#631 ? |
could you try same thing with presigned URL to confirm? |
I have no time to test it these days, maybe later. But assumption that aws breaks in case of 2 concurrent requests per second sounds awkward. |
Ok, I hacked some aiobotocore and botocore code and confirmed a reason of the issue. aiobotocore is currently broken by design for streaming requests (probably all requests greater than N Kb). It works like that:
Possible solutions are:
I'd do both in that order. First to temporary fix an issue, second to get proper long-term solution. |
Solution # 1 |
Interesting, aiobotocore does use pool but unbounded one, |
so for request connection acquired from pool, and released once |
It didn't dig that deep and unfortunately don't know internals of botocore, so cannot judge. |
Should be fixed now, by #19, I tested manually with you script looks like working. Issue was super tricky, due to garbage collector collected response as result FlowControlStreamReader stoped working correctly. Thanks you for finding and helping to fix this issue! |
Thank you! |
I've tried to build simplest possible web server talking to s3 and found an issue:
Run following example:
Then use
You'll get following output:
In logs:
It seems that in case of multiple requests obj['Body'] might be broken.
Even if you try to move this block
inside of the "get_content" function it will act the same.
The text was updated successfully, but these errors were encountered: