Loading

×Sorry to interrupt
Uncaught ReferenceError: addCTracking is not defined
throws at https://kb.vmware.com/resource/KM_TealiumTrackingJS?v=0.5:100:1

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

My Subscriptions

Loading

Knowledge Base

VCSA database storage /storage/db is full or nearly full (51981)

Last Updated: 11/8/2023Categories: TroubleshootingTotal Views: 78353Language:
JapaneseEnglish

16 like this article

Subscribe to get an email
newsletter with new updates

16 people found this helpful Please provide article feedback:

Symptoms

In the /var/log/vmware/vpxd/vpxd.log file, you see entries similar to:

No Space left on device

In the /storage/db/vpostgres/pg_log/postgresql.log file, you see entries similar to:

psql.bin:  could not extend file "pg_tblspc/16392/PG_9.4_201409291/16385/8126296": No space left on device​

Running df -h, you see entries similar to:

50G 50G 0G 100% /storage/db

Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.

For more information about log files, see Location of vCenter Server log files (1021804).

Purpose

This article provides steps to allow the application to continue to function while giving steps to allow reduce the footprint of the database on disk.

Cause

Most likely the database is holding redundant data. The redundant data that the database is holding is referred to as bloat.

Bloat can be caused by a variety of reasons:

Bugs in applications which connect to the database

Long running idle transactions

Internal database processes not aggressive enough to do database housekeeping.

VCSA OS has lost control of the thread of the automatic database clean-up utility process

Impact / Risks

The required service vmware-vpxd will not start and VCSA will be inaccessible through the client.

Resolution

Reboot the vCenter Server

This will resolve any problem with lost process threads.

Note the percentage space full you saw when running df -h from the command line.

Find if the VCSA virtual machine is managed through another vCenter Server. If the vCenter Server is on a host in the cluster find which ESXi host manages the vCenter Server virtual machine. Access the host client by opening a web browser tab to the host web client at https://<host IP or FQDN>.

Open a console window to the VCSA VM.

Select to shut down the guest operating system. Do not power off.

After reboot wait 30 minutes  then run df -h again to check the space available.

If space free is not any better than before, continue with the steps below.

Resolving a completely full partitition

If the database disk is 100% full you will have to extend it. The cleanup utility does need some space as overhead to function. Increase the disk size and extend the partition that's full on the df -h output.

To increase the disk size, see Increasing the disk space for the VMware vCenter Server Appliance in vSphere 6.5, 6.7 and 7.0

Check for bloat

Download the script attached to this KB 51981_check_bloat.sql

Connect to the DB: /opt/vmware/vpostgres/current/bin/psql -U postgres -d VCDB

Copy and paste the content of the file and hit enter.

Check the results. If the tbloat column or the ibloat column are >25 then  schedule maintenance to reduce the bloat in this database.

Note: This query looks at table , index structure, and the number of rows in a table, and estimates the minimum size required to hold that data. It then compares this estimate to the actual current size, to estimate bloat.

To determine the top tables taking up space in the VCSA vPostgres, run this query:

SELECT nspname || '.' || relname AS "relation",
pg_size_pretty(pg_total_relation_size(C.oid)) AS "total_size"
FROM pg_class C
LEFT 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) DESC
LIMIT 20;

Remove the bloat

Stop all the services:

service-control --stop --all

Run the below command to start the vpostgres:

service-control --start vmware-vpostgres

Run the command to connect to postgres service:

/opt/vmware/vpostgres/current/bin/psql -U postgres -d VCDB

To rebuild all the tables and indexes on the database:

vacuum full;

Note: This command will remove all bloat.

To collect new statistics for the planner to use for optimal performance

vacuum analyze;

To quit from the path:

\q

Run the command to start all the service:

service-control --start --all

Related Information

vCenter Server Appliance Data Integrity Best Practices

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
JapaneseEnglish

Attachments

51981_check_bloat

Additional Resources

KB
•
End Of General Availability of the Free vSphere Hypervisor (ESXi 7.x and 8.x) (2107518)

Result 1 of 1

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware vCenter Server Appliance

VMware vCenter Server

Related Versions:

VMware vCenter Server Appliance 6.7.x

VMware vCenter Server Appliance 6.5.x

VMware vCenter Server 7.0.x

Take Our Survey

Support Assistant