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

Occasional ReadTimeoutErrors since version 3.6.0 #343

Closed
sommejan opened this issue Feb 28, 2024 · 1 comment
Closed

Occasional ReadTimeoutErrors since version 3.6.0 #343

sommejan opened this issue Feb 28, 2024 · 1 comment

Comments

@sommejan
Copy link

We have an issue since we upgraded from 2.12.0 to 3.6.0. Sometimes we get the said error when receiving a mollie webhook and the error happens exactly when we try to fetch the related payment with client.payments.get(payment_id). We cannot find any similarities between the requests involved and it also happens at different times but not each time but each time at the same point I mentioned above. Our Python version was upgraded from 3.7 to 3.10.

RequestError: Unable to communicate with Mollie: HTTPSConnectionPool(host='api.mollie.com', port=443): Max retries exceeded with url: /v2/payments/tr_xxx (Caused by ReadTimeoutError("HTTPSConnectionPool(host='api.mollie.com', port=443): Read timed out. (read timeout=5)"))
  File "xyy", line 512, in fetch_payment
    return client.payments.get(payment_id)
  File "mollie/api/resources/payments.py", line 44, in get
    return super().get(resource_id, **params)
  File "mollie/api/resources/base.py", line 97, in get
    result = self.perform_api_call(self.REST_READ, path, params=params)
  File "mollie/api/resources/base.py", line 42, in perform_api_call
    resp = self.client.perform_http_call(http_method, path, data, params, idempotency_key)
  File "mollie/api/client.py", line 276, in perform_http_call
    return self._perform_http_call_apikey(
  File "mollie/api/client.py", line 227, in _perform_http_call_apikey
    raise RequestError(f"Unable to communicate with Mollie: {err}")

Originally posted by @sommejan in #339 (comment)

@geertjanvdenbosch
Copy link
Collaborator

This has since been fixed for @sommejan. It was related to the Azure setup and how Azure handles timeouts. Instantiating the client for each request resolves the issue.

Any further discussion can take place in #339.

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

No branches or pull requests

2 participants