vCenter Server UI is inaccessible with error: No healthy upstream.
vCenter Server log files contain the following errors:
/var/log/vmware/vpxd/vpxd.log: No Space left on the device.
/storage/db/vpostgres/pg_log/postgresql.log: psql.bin: could not extend file "pg_tblspc/####/PG_9.4_####/####/####": No space left on device.
Command df -h confirms /storage/db partition is full.
VMware vCenter Server 6.x
VMware vCenter Server 7.x
VMware vCenter Server 8.x
Accumulation of redundant data causes database bloat, filling up the /storage/db partition. Additional contributing factors include:
Known bugs related to database.
Persistent idle transactions.
Ineffective internal database maintenance processes.
Failure of the vCenter Server operating system to manage the automatic database cleanup utility threads.
Note: Prior to executing the following steps, take a backup or an offline snapshot (powered-off state) of the vCenter Server. If the vCenter Server is part of an Enhanced Linked Mode (ELM) setup, simultaneous snapshots must be taken for all replicating vCenter Servers. Refer VMware vCenter in Enhanced Linked Mode pre-changes snapshot (online or offline) best practice
To remediate database bloat and reclaim disk space, perform the following steps:
Reboot vCenter Server: Rebooting restores lost process threads for automatic cleanup.
Run df -h and record current /storage/db utilization.
Identify the ESXi host managing the vCenter Server.
Log in to the ESXi host Client at https://<ESXi_IP>.
Navigate to the vCenter Server VM > Shut Down Guest OS.
Wait 30 minutes after the VCSA reboots.
Run df -h. If the utilization remains unchanged, proceed to section 2.
Extend Partition (If the partition is 100% full): The database cleanup utility requires overhead space to function.
Increase the virtual disk size and extend the partition.
Refer to Increasing the disk space for the VMware vCenter Server Appliance for instructions.
Analyze database bloat:
Download the check_bloat.sql script attached to this article.
Execute the script: psql -d VCDB -U postgres -f check_bloat.sql
Review the tbloat and ibloat columns. If any value exceeds 25, proceed to remove bloat.
To identify specific high-utilization tables, run:
SELECT nspname || '.' || relname AS "relation",pg_size_pretty(pg_total_relation_size(C.oid)) AS "total_size"FROM pg_class CLEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)WHERE nspname NOT IN ('pg_catalog', 'information_schema')AND C.relkind <> 'i'AND nspname !~ '^pg_toast'ORDER BY pg_total_relation_size(C.oid) DESCLIMIT 20;Remove database bloat :
Stop all vCenter Server services: service-control --stop --all
Start the vPostgres service: service-control --start vmware-vpostgres
Connect to the database: /opt/vmware/vpostgres/current/bin/psql -U postgres -d VCDB
Rebuild all tables and indexes: vacuum full;
Update statistics for the query planner: vacuum analyze;
Exit the prompt: \q
Start all vCenter Server services: service-control --start --all