Symptoms

After an attempt to manually run periodic task Synchronize resource usage for instances of APS applications the following error message is thrown:

Internal error: Resource usage synchronization is already in progress.

Cause

Task likely fails due to a database deadlock, please refer to #117637 "Database deadlocks in OA".

Resolution

Please collect the information on deadlocks by running query

plesk=> SELECT bl.pid AS blocked_pid, a.usename AS blocked_user,kl.pid AS blocking_pid, ka.usename AS blocking_user, a.current_query AS blocked_statement FROM pg_catalog.pg_locks bl JOIN pg_catalog.pg_stat_activity a  ON bl.pid = a.procpid JOIN pg_catalog.pg_locks kl JOIN pg_catalog.pg_stat_activity ka ON kl.pid = ka.procpid ON bl.transactionid = kl.transactionid AND bl.pid != kl.pid WHERE NOT bl.granted;

Restart PEM and PAU services (or only PEM service in case of OA <= 6.0) on osscore as described in #4642 "How to restart OA system services: UI, Management Node, Agents". To find out the root cause of the deadlock, please contact Odin technical support and provide the result of query above.

Internal content