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

timeout increased to 10sec #78

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

Balaji-Kotni
Copy link

before timeout set to 5sec its very low some times if network is not good getting this error :

raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='......', port=....): Read timed out. (read timeout=5)

for every two request i am getting this problem so i increased the timeout to 10 sec...

Thank you.

before timeout set to 5sec its very low some times if network is not good getting this error : 
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='......', port=....): Read timed out. (read timeout=5)


for every two request i am getting this problem so i increased the timeout to 10 sec...

Thank you.
@touhami92
Copy link

no need to change the default value; it is possible to create an instance with a timeout=10

wcapi = API(
    url="http://example.com",
    consumer_key="ck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    consumer_secret="cs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    version="wc/v3",
    timeout=10
)

1 similar comment
@touhami92
Copy link

no need to change the default value; it is possible to create an instance with a timeout=10

wcapi = API(
    url="http://example.com",
    consumer_key="ck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    consumer_secret="cs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    version="wc/v3",
    timeout=10
)

@tvdsluijs
Copy link

It would also be nice if there would be a retry mechanism for when you get a 443 (timeout) after all

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

Successfully merging this pull request may close these issues.

3 participants