Postgres connection exhaustion disables services in large VMware vSAN DP and VMware Protection and Recovery environments
search cancel

Postgres connection exhaustion disables services in large VMware vSAN DP and VMware Protection and Recovery environments

book

Article ID: 463498

calendar_today

Updated On:

Products

VMware Live Recovery

Issue/Introduction

  • In a large-scale environment running vSAN Data Protection and VMware Protection and Recovery, DP services become non-functional due to exhausted Postgres connections.
  • Site Recovery Protection Groups automatically get deleted and recreated continuously.
  • /var/log/vmware/vpostgres/postgresql.log logs error the below error continuously:

snapservice [local] 3427483 1 FATAL:  sorry, too many clients already

Environment

VMware Protection and Recovery 9.1.x

Cause

  • The VMware vSAN Snapservice does not configure a maximum limit on PostgreSQL connections.
  • As a result, when Snapservice consumes available connections, other services are unable to maintain stable connections to the PostgreSQL databases.

Resolution

Broadcom Engineering is aware of the issue and is working on a fix

Workaround

To prevent the issue from occurring, follow the below steps:

  1. Edit /db/postgres/postgresql.conf
  2. Set max_connections = 600
  3. Restart postgres service:
    systemctl restart vpostgres.service

For recovery after the issue occurs, besides increasing the max connections, delete the stale Site Recovery Protection Groups or Recovery Plans:

/bin/python /opt/vmware/bin/srm-dbtool/SrmDbTool.py delete ProtectionGroup <group name>
/bin/python /opt/vmware/bin/srm-dbtool/SrmDbTool.py delete RecoveryPlan <plan name>