Symptoms

Office 365 "Provisioning "Migration" task fails:

"message": "Unable to synchronize domains and users from the Cloud to PA. Please resolve an issue and restart the task. Error details: The operation has timed out",
...
"http_request": "POST /O365App/aps/migrations"

sitelog error:

DEBUG aps_endpoint: 63647165764312981253 - Request: POST https://10.20.104.11/O365App/aps/migrations
...
ERROR aps_endpoint: Migration was not completed because of error: System.Net.WebException: The operation has timed out
at System.Net.HttpWebRequest.GetResponse()

core.log error:

DBG [rest:2620941 1:4874:7f43f781c700 SAAS 555478196]: [ RDBMS] Prepare [0x7f441b2ee910]: SELECT "id" FROM "aps_resource" WHERE "uid" = $1 FOR UPDATE
...
DBG [rest:2620941 1:4874:7f43f781c700 SAAS ]: [ APSC] [APS::Controller::RESTful::BaseRequest::run] <=== EXIT (by exception) [300.036243]
ERR [rest:2620941 1:4874:7f43f781c700 SAAS ]: [ APSC] REST Error: PUT /aps/2/application/tenants/8600494f-f027-4279-9d97-8248d441202d/ c

Cause

Standard pau timeout of 300 sec is reached during the SELECT ... FOR UPDATE operation due to OA DB deadlock.

Resolution

Collect detailed information using https://kb.cloudblue.com/en/118666 and then restart pau and pa-agent services.

Internal content

Link on internal Article