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

Why is ThrottlingException not caught and retried by Connection._make_api_call:? #1146

Closed
ilanjb opened this issue Jan 17, 2023 · 2 comments
Closed

Comments

@ilanjb
Copy link

ilanjb commented Jan 17, 2023

I'm using TransactWire to make batch updates
I'm getting this traceback

  File "/python3.7/site-packages/pynamodb/transactions.py", line 31, in __exit__
    self._commit()
  File "/python3.7/site-packages/pynamodb/transactions.py", line 132, in _commit
    return_item_collection_metrics=self._return_item_collection_metrics,
  File "/python3.7/site-packages/pynamodb/connection/base.py", line 1121, in transact_write_items
    raise TransactWriteError("Failed to write transaction items", e)
pynamodb.exceptions.TransactWriteError: Failed to write transaction items

I see that this is intentionally not retried
pynamodb.connection.base.Connection._make_api_call:
except (ValueError, botocore.exceptions.HTTPClientError, botocore.exceptions.ConnectionError) as e:
It seems that ThrottlingException should be retried. It is retried by default in boto3

@ikonst
Copy link
Contributor

ikonst commented Jan 17, 2023

There's been work underway by @garrettheel to switch us to call boto under the hood, which would lead us to leverage boto's default behavior.

@ilanjb
Copy link
Author

ilanjb commented Jan 19, 2023

I'll follow there. thanks!

@ilanjb ilanjb closed this as completed Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants