Skip to content

timeout increased to 10sec #78

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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
)

@ghost
Copy link

ghost commented Jun 17, 2023

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

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

Successfully merging this pull request may close these issues.

2 participants