-
Notifications
You must be signed in to change notification settings - Fork 181
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
Requests to AWS S3 hang with HTTP.jl v0.9.15 #772
Requests to AWS S3 hang with HTTP.jl v0.9.15 #772
Comments
Most likely yea, does it work again if you |
Fortunately you can call |
#517 is very similar. |
i'll give it a go :) it didn't fix it on my first attempt, but i'm not too familiar with the AWS code so might need to add a |
I would guess what is happening is that somewhere in the code for AWS / AWSS3 This makes me think that #752 was not the right solution to #543 It might still be better as a hack to close all streams except |
467: Always close the `response_stream` after `HTTP.request` r=mattBrzezinski a=nickrobinson251 - We need to explicitly close the `response_stream` (`HTTP.request` no longer closes it for us) in HTTP.jl v0.9.15+ (see JuliaWeb/HTTP.jl#752) - Since `close` is safe to call multiple times, this should be compatible with old HTTP.jl versions. - Should fix issue #466 (and JuliaCloud/AWSS3.jl#215) - Also since we're fixing this here, we can close JuliaWeb/HTTP.jl#772 ~TODO: add test... i just need to recreate the issue using AWS.jl explicitly (rather than AWSS3)~ done. Co-authored-by: Nick Robinson <[email protected]> Co-authored-by: Nick Robinson <[email protected]>
467: Always close the `response_stream` after `HTTP.request` r=mattBrzezinski a=nickrobinson251 - We need to explicitly close the `response_stream` (`HTTP.request` no longer closes it for us) in HTTP.jl v0.9.15+ (see JuliaWeb/HTTP.jl#752) - Since `close` is safe to call multiple times, this should be compatible with old HTTP.jl versions. - Should fix issue #466 (and JuliaCloud/AWSS3.jl#215) - Also since we're fixing this here, we can close JuliaWeb/HTTP.jl#772 ~TODO: add test... i just need to recreate the issue using AWS.jl explicitly (rather than AWSS3)~ done. Co-authored-by: Nick Robinson <[email protected]> Co-authored-by: Nick Robinson <[email protected]>
It should be pointed out that using I think the general rule should be that you shouldn't close |
But read would still block, e.g. this code now hangs:
Yea, this makes sense, but perhaps it was a bit too optimistic to put this in a feature release. |
With
[email protected]
, i'm seeing GET requests to S3 hang indefinitely.The actual behaviour i am seeing is using AWSS3.jl v0.9.2 (example at JuliaCloud/AWSS3.jl#215), but the behaviour is only present when using HTTP v0.9.15.
I haven't quite narrowed down what's going on... but here's a bit of thinking out loud:
AWSS3.s3_get_file
callsget_object
(which is a AWS.jl call)AWS.s3("GET", "/$(Bucket)/$(Key)"; aws_config)
AWS.RestXMLService
object...HTTP.Request
and callsHTTP.request
HTTP.Request
: https://github.com/JuliaCloud/AWS.jl/blob/564f9c55291a29c6994bf39625912256bf2e9c4f/src/AWS.jl#L223-L232)submit_request
: https://github.com/JuliaCloud/AWS.jl/blob/9a37112f63cc38a59f6b255bb1aff74fc697eec5/src/utilities/request.jl#L59-L84HTTP.request
: https://github.com/JuliaCloud/AWS.jl/blob/9a37112f63cc38a59f6b255bb1aff74fc697eec5/src/utilities/request.jl#L186-L196Looking at the 0.9.15 changes (v0.9.14...v0.9.15) i'd guess the most related change might be #752 ?
Needs further investigation :)
The text was updated successfully, but these errors were encountered: