#nick_error-locktimeout

1 messages ¡ Page 1 of 1 (latest)

hybrid schoonerBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1254852401655976106

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

weak crow
#

nick_error-locktimeout

formal coral
#

More background: I am working on processing up to 5 payments at the same time via an Azure queue. I ran a test job with 200+ payments (all were for the same customer). This is not a production use case, but I did this for ease of testing. I am just looking for confirmation/insight into what object was locked (I'm guessing and hoping I'm just hitting this error because these requests were all for the same customer)

weak crow
#

Yeah the issue is that you are making multiple parallel requests to the exact same Customer and PaymentMethod. During a payment we will "lock" the PaymentMethod and Customer objects so each request has to wait for the lock to be released before it can go on. If you have 5 parallel requests all doing the same thing then each one will wait for the previous one to finish.

So really you need to change/fix your code so that those requests are done sequentially one at a time and not in parallel like what you are doing.

formal coral
#

Ok, cool. Yeah, like I said, this will very likely never happen in our production environment so I'm not sure we need to change this process, except add retries.

#

thanks so much!