In short, the error messages are as follows (the list may be incomplete):

[APSC] Could not send Query (connection dead)

[APSC] Error while executing the query; ERROR: cursor "sql_cur0x9f4fe38" does not exist.

[APSC] Connection is already in use

Cause

The reason for the task failures is a problem in APS Service Controller with connecting to the POA database when several processes are working with database the (e.g. provisioning APS application instances while also running a resource reporting task, etc.).

One of the most time/resource-consuming tasks is the periodic task "Synchronize resource usage for instances of APS applications", which runs in the default installation every 5 minutes. If it is run, then the usual APS tasks may fail due to a problem with database connections.

Resolution

If POA cannot be updated immediately, the following workaround may be used: schedule the periodic task "Synchronize resource usage for instances of APS applications" to run once a day at night. This may be done in POA Provider Control Panel at Top > System Director > Task Manager > Periodic Tasks.

The same issue can occur not only because of the periodic task, but also on simultaneous provisionings of APS applications, because the solution in such situations is to re-run failed tasks.