Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Feature request: Add support for client-side timeout #26

Closed
guangyang opened this issue Apr 6, 2013 · 4 comments
Closed

Feature request: Add support for client-side timeout #26

guangyang opened this issue Apr 6, 2013 · 4 comments
Labels

Comments

@guangyang
Copy link
Contributor

It is possible for an HTTP call to never return. When that happens, the client needs to know when to give up, using a client-side timeout. See this Java code that adds the client-timeout support for ideas.

Note: PHP does not have this feature, and neither did Java for the first 8 months.

@guangyang
Copy link
Contributor Author

Move to backlog since it's not a must have for the initial release.

@azuresdkci azuresdkci removed this from the backlog milestone Sep 21, 2014
@devigned devigned added the Team label Apr 3, 2015
@devigned devigned closed this as completed May 1, 2015
@sedouard
Copy link

sedouard commented Sep 9, 2015

Hey @devigned @guangyang I'm hitting this issue quite hard while doing some integration with cloud foundry.

We're trying to upload a large page blob, (thousands of pages). We're doing it multithreaded and at some point all of our upload threads hang. I tried patching the http_request to use http.open_timeout = 90 to see if that would help (our code will do 20 upload retries per thread). We do specify a timeout of 300 seconds but thats not being honored by the server so we'd like to kill the connection ourselves.

Raising an exception on our thread calling the sdk doesn't seem to clean up the tcp connection (we see the connections hanging via tcptrack).

Any guidance here on the best way to implement a client-side timeout that will cleanup the connection?

@ritazh - FYI

@sedouard
Copy link

This issue happens almost all the time for us, but sometimes (rarely) the code as it is works. I'm sure in other network situations, the code may work more reliably but this issue causes the upload to not work in some scenarios.

@sedouard
Copy link

And FYI - I've had to do a similar implementation for the bosh azure cpi.

It would be great to get something like this into the ruby sdk. I'm not a ruby pro though and I'm not sure what timeout we'd want to use but I'd be happy to PR a change here if you guys think you'll take it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants