Skip to content
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

SWF: How to set client side socket timeout? #200

Closed
amatthies opened this issue Aug 2, 2015 · 3 comments
Closed

SWF: How to set client side socket timeout? #200

amatthies opened this issue Aug 2, 2015 · 3 comments
Labels
feature-request This issue requests a feature.

Comments

@amatthies
Copy link

Documentation for SWF.Client.poll_for_decision_task says:

Workers should set their client side socket timeout to at least 70 seconds (10 seconds higher than the maximum time service may hold the poll request).

But how do I do that?
socket.setdefaulttimeout(70) has no effect.

When polling, I do sometimes get timeout errors as

botocore.vendored.requests.packages.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='swf.eu-west-1.amazonaws.com', port=443): Read timed out. (read timeout=60)

DEBUG botocore.retryhandler - Retry needed, action of: 6.221778283110354
DEBUG botocore.endpoint - Response received to retry, sleeping for 6.221778283110354 seconds

I also don't know how to avoid the retries, so my polling workers are sleeping for longer and longer - and I'm forced to continue using boto2.

@jamesls
Copy link
Member

jamesls commented Aug 10, 2015

Thanks for pointing this out. There's no config option for this currently. Marking this as a feature request.

@jamesls jamesls added the feature-request This issue requests a feature. label Aug 10, 2015
@rjpereira
Copy link

After raising the problem above some time ago, I found a temporary workaround (until properly fixed) by editing botocore/endpoint.py and changing

DEFAULT_TIMEOUT = 70

not ideal, but got me back on track...

@rayluo
Copy link
Contributor

rayluo commented Sep 2, 2015

The finalized usage is documented at the top of this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request This issue requests a feature.
Projects
None yet
Development

No branches or pull requests

4 participants