Collect the number of active database connections to specific databases running in VMware Aria Automation 8.x
search cancel

Collect the number of active database connections to specific databases running in VMware Aria Automation 8.x

book

Article ID: 326043

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

Collect data on database statistics to determine how many active connections there are.

Symptoms:
  • You are experiencing slowness in VMware Aria Automation during load.
  • You are receiving an error similar to the following:
'too many connections for role "ebs-db"'


Environment

VMware vRealize Automation 8.1.x
VMware vRealize Automation 8.x

Resolution

See the Workaround section below for additional information.

Workaround:

Prerequisites

  • You have SSH access to the VMware Aria Automation or Automation Orchestrator appliances.
  • You have the root username and password for each appliance participating in the cluster.

Procedure

  1. Login to one of the appliances via SSH.
  2. Connect to the database
    vracli dev psql
  3. To check the connection limit per db run the following command:
    SELECT rolname, rolconnlimit FROM pg_roles WHERE rolconnlimit <> -1;
  4. To see the active connection run the following query:
    select count(*) from pg_stat_activity where state='active';
  5. Active connections for a specific database, you may run the below query. This example uses the ebs-db.
    select count(*) from pg_stat_activity where state='active' and rolname='ebs-db';