Skip to content

timeout increased to 10sec#78

Open
Balaji-Kotni wants to merge 1 commit into
woocommerce:trunkfrom
Balaji-Kotni:patch-1
Open

timeout increased to 10sec#78
Balaji-Kotni wants to merge 1 commit into
woocommerce:trunkfrom
Balaji-Kotni:patch-1

Conversation

@Balaji-Kotni

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown

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

ghost commented Jun 17, 2023

Copy link
Copy Markdown

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.

2 participants