#GiovanniV - Token In Use

1 messages ยท Page 1 of 1 (latest)

wind siren
void cargo
urban steeple
#

Hello! What does EPP stand for?

#

The token_in_use error is not referring to the idempotency key, it's referring to the token being used to create the Charge. Are you making these requests serially (meaning you wait for one request to complete and return a response before moving onto the next)?

#

If you're making the requests in parallel you should switch to making them serially and that may solve the issue.

void cargo
#

that makes sense thank you

urban steeple
#

Happy to help! Let us know if that doesn't solve the issue and we can help further. ๐Ÿ™‚

void cargo
#

thanks for the quick response. So, are you saying this is more of an internal Stripe token allocation issue vs. something in our code? We are sending in parallel currently for improved throughput, but your recommendation is to make this a serial operation?

urban steeple
#

Yes. You're encountering internal locks on our side because you're trying to perform operations on the same thing at the same time.

#

If you switch to a serial approach you should be able to avoid that issue.

astral meadow
#

in particular, the issue here is that you're trying to make many charges on the same connected account in parallel

#

presumably you'd be making those on many different accounts in production?

#

if you're trying to simulate making a lot of charges, you might need to create more than one test connected account to run the charges on

urban steeple
#

Specifically this part:

Lock contention is caused by concurrent access on related objects. Integrations can vastly reduce this by making sure that mutations on the same object are queued up and run sequentially instead. Concurrent operations against the API are still okay, but try to make sure simultaneous operations operate only on unique objects.

void cargo
#

thank you!

urban steeple
#

Happy to help! Nice to see you survived the Discord outage. ๐Ÿ˜