pem.activateSubscription call fails with statement timeout.
The following error is recorded in
May 17 10:20:15 osscore : at org.jacorb.poa.RequestProcessor.run(RequestProcessor.java:769) [jacorb-2.3.2.redhat-5.jar!/:2.3.2.redhat-5] Caused by: org.hibernate.exception.LockAcquisitionException: could not execute statement ... May 17 10:20:15 osscore : at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:250) ~[jboss-as-ejb3-7.3.0.Final-redhat-14.jar!/:7.3.0.Final-redhat-14] ... 79 common frames omitted Caused by: org.postgresql.util.PSQLException: ERROR: deadlock detected Detail: Process 16024 waits for ShareLock on tuple (11,12) of relation 531505425 of database 16406; blocked by process 16060. Process 16060 waits for ShareLock on transaction 2374090872; blocked by process 16056. Process 16056 waits for ShareLock on transaction 2374091025; blocked by process 16024. Hint: See server log for query details. Where: SQL statement "SELECT 1 FROM ONLY "public"."resource_types" x WHERE "rt_id" OPERATOR(pg_catalog.=) $1 FOR SHARE OF x"
Tracing SQL PIDs through the same log, it can be seen that they belong to pem.setResourceTypeLimits and pem.activateSubscription API calls running simultaneously.
The issue may occur during parallel runs of Office 365 APS 1.2 - 2.0 migration.
Deadlock on querying details about the same resource types by different actors. The issue is recognized as POA-97879.
To be fixed in future release.
As a workaround, avoid running simultaneous API requests not separated by transaction ID.