Symptoms
While executing SetDefaultPaymentMethod_API xmlrpc call, the error comes:
ODBC code #40P01: ERROR: deadlock detected
Process 4319 waits for ShareLock on transaction 16805763; blocked by process 4502.
Process 4502 waits for ShareLock on transaction 16805759; blocked by process 4319.;
Error while executing the query
Cause
- Order is placed with PlaceOrderAndAuthorize_API.
- Payment is created for order using Payment Method mentioned in API.
- OrderStatusChange starts for Payment order.
- SetDefaultPaymentMethod_API is executed to make the same payment method default for customer.
APIs are sent with several seconds interval and OrderStatusChange is executed simultaneously with SetDefaultPaymentMethod_API. As a result deadlock occurs.
Resolution
The issue is fixed in PBA-E 5.5.6. Please upgrade to the latest vesion of PBA-E.