After some more investigating and debugging we pinpointed the issue a bit further.
here is the stacktrace of the error:
File "/workspace/src/shared/infra/microsoft_data_in_document_merger.py", line 51, in merge_data_in_document
aspose_api_client = WordsApi(
^^^^^^^^^
File "/workspace/lib/asposewordscloud/apis/words_api.py", line 67, in __init__
data = self.get_public_key(GetPublicKeyRequest())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/lib/asposewordscloud/apis/words_api.py", line 12543, in get_public_key
data = self.get_public_key_with_http_info(request, **kwargs) # noqa: E501
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/lib/asposewordscloud/apis/words_api.py", line 12585, in get_public_key_with_http_info
return request.deserialize_response(self.api_client, self.api_client.call_api(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/lib/asposewordscloud/api_client.py", line 406, in call_api
return self.__call_api(resource_path, method,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/lib/asposewordscloud/api_client.py", line 165, in __call_api
self.request_token()
File "/workspace/lib/asposewordscloud/api_client.py", line 145, in request_token
response_data = self.request(
^^^^^^^^^^^^^
File "/workspace/lib/asposewordscloud/api_client.py", line 449, in request
return self.rest_client.POST(url,
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/lib/asposewordscloud/rest.py", line 281, in POST
return self.request("POST", url,
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/lib/asposewordscloud/rest.py", line 186, in request
r = self.pool_manager.request(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/layers/google.python.pip/pip/lib/python3.12/site-packages/urllib3/_request_methods.py", line 143, in request
return self.request_encode_body(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/layers/google.python.pip/pip/lib/python3.12/site-packages/urllib3/_request_methods.py", line 278, in request_encode_body
return self.urlopen(method, url, **extra_kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/layers/google.python.pip/pip/lib/python3.12/site-packages/urllib3/poolmanager.py", line 459, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/layers/google.python.pip/pip/lib/python3.12/site-packages/urllib3/connectionpool.py", line 871, in urlopen
return self.urlopen(
^^^^^^^^^^^^^
File "/layers/google.python.pip/pip/lib/python3.12/site-packages/urllib3/connectionpool.py", line 871, in urlopen
return self.urlopen(
^^^^^^^^^^^^^
File "/layers/google.python.pip/pip/lib/python3.12/site-packages/urllib3/connectionpool.py", line 871, in urlopen
return self.urlopen(
^^^^^^^^^^^^^
File "/layers/google.python.pip/pip/lib/python3.12/site-packages/urllib3/connectionpool.py", line 841, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/layers/google.python.pip/pip/lib/python3.12/site-packages/urllib3/util/retry.py", line 519, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.aspose.cloud', port=443): Max retries exceeded with url: /connect/token (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x3e8c9d4de720>, 'Connection to api.aspose.cloud timed out. (connect timeout=None)'))
It seems that we are getting connection retries while retrieving a token.
This seems to originate from the request_token method of the ApiClient object.
We have now updated this code:
# perform request and return response
response_data = self.request(
'POST', url, query_params=[], headers=header_params,
post_params=form_params, body=None,
_preload_content=True,
_request_timeout=(2,30)) # this was None, but this seems to cause timeouts
We started experiencing this issue on August 28, around noon.
Our change seems to have mitigated the issue, but we will keep an eye on it for the coming days.
Was there something on the aspose side that can explain why this started occuring?
Alexander