Symptoms
The task Upgrading resources of application 'Office 365' fails with the output like below:
Internal error: APSC: Upgrade to ver. 17.2.1-4 : resource d4b60ff8-7a37-4dc5-a493-86f2407f4b76 of type 'office365app' (http://www.parallels.com/Office365/Office365app/1.22) for APS application 'Office 365-17.2.1-4' : DBService invocation error: FATAL: terminating connection due to idle-in-transaction timeout Query: UPDATE aps_application_instances SET app_ver = (SELECT version || '-' || release FROM aps_package WHERE uid = ? ) WHERE uuid = ? Parameters: [449686c9-e29a-4b3a-b55d-430ae18a1b3d, 26035cbc-b8c6-4b83-8458-b6a01585e4a5].
Cause
The application instance has a huge number of related APS resources to be upgraded. The current value of the idle_in_transaction_session_timeout
Postgres parameter is not enough:
[root@osscore]# grep idle_in_transaction /var/lib/pgsql/9.6/data/postgresql.conf
idle_in_transaction_session_timeout = 1800000 # in milliseconds, 0 is disabled
Resolution
- Go to the node where the platform database
oss
is running Edit the Postgres configuration file
/var/lib/pgsql/9.6/data/postgresql.conf
and set up a higher timeout, for example:idle_in_transaction_session_timeout = 3600000
the required value is individual and depends on the resource number and DB server performance.
Restart platform and DB services in the below order:
# service pa-agent stop # service pau stop # systemctl restart postgresql-9.6 # service pau start # service pa-agent start
- Resubmit the failed task.