VMware Cloud Community
jasmeetsinghsur
Enthusiast
Enthusiast
Jump to solution

Purging vCenter task & event logs from VCDB hosted on external SQL server.

Hi,

The vCenter database is full which is causing vpxd service to stop automatically that results in a complete shutdown of vCenter access through Web Client. Reference logs as below

vCenter Version:  6.5.0.20000 Build 9451637

vpxd.log
---------
2019-08-15T15:03:44.787+05:30 info vpxd[33172] [Originator@6876 sub=vpxdVdb] WarningThreshold: 80% ErrorThreshold: 95%.
2019-08-15T15:03:44.787+05:30 error vpxd[33172] [Originator@6876 sub=vpxdVdb] Insufficient free space for the Database (used: 96%; threshold: 95%)
2019-08-15T15:03:44.788+05:30 info vpxd[33172] [Originator@6876 sub=Main] ** BEGIN SERVICES ** (time to active: 10246 ms)

Now we managed to create some space on the DB and started the vpxd service. We have check that the task & event is taking the maximum space on the vCenter database as the retention policy is set to 730 days. My question is, what if we decrease the retention period for task & event in vCenter? Can it auto delete/ purge  the records from Database or do we have to execute some manual commands? Got an article related to the same Purging old data from the database used by vCenter Server (1025914).. Kindly advice.

Thanks

Jasmeet Singh

Reply
0 Kudos
1 Solution

Accepted Solutions
IRIX201110141
Champion
Champion
Jump to solution

Just follow KB 1025914 too free up the space for your DB to get vCenter working again. Keep in mind that some additional DB cleanup/merge tasks are needed of you perform a mass delete within a SQL DB.

Normaly my customers sets something between 30-60 days for the retension policy. IIRC VMware sets it to 30 days as default in todays installation. In the early days of Windows vCenter the boxed for limited Task/Events was unchecked.

Regards,

Joerg

---------------------------------------------------------------------------------------------------------

Was it helpful? Let us know by completing this short survey here.

View solution in original post

4 Replies
Alex_Romeo
Leadership
Leadership
Jump to solution

Hi,

Read point ten:

You can configure the maximum number of database connections that can occur simultaneously. To limit the growth of the vCenter Server database and save storage space, you can configure the database to discard information about tasks or events periodically.

Procedure

  1. In the vSphere Client, navigate to the vCenter Server instance.
  2. Select the Configure tab.
  3. Under Settings, select General.
  4. Click Edit.
  5. Select Database.
  6. In Maximum connections, type a number. Increase this number if your vCenter Server system performs many operations frequently and performance is critical. Decrease this number if the database is shared and connections to the database are costly. Do not change this value unless one of these issues pertains to your system.
  7. To have vCenter Server periodically delete the retained tasks, select the Enabled box next to Task cleanup.
  8. (Optional) In Task retention (days), type a value in days. Information about tasks that are performed on this vCenter Server system is discarded after the specified number of days.
  9. To have vCenter Server periodically clean up the retained events, select the Enabled box next to Event cleanup.
  10. (Optional) In Event retention (days), type a value in days. Information about events for this vCenter Server system is discarded after the specified number of days.
  11. (Optional) To monitor vCenter Server database consumption and disk partition, open the vCenter Server Appliance Management Interface.
  12. Click Save.

Optional) In Event retention (days), type a value in days.

Server information is discarded after the specified number of days, so if you reduce the days, the days saved after that date are automatically deleted.

Configure Database Settings

If you decrease the days, the saves beyond that date are automatically canceled.

Best regards

Alesando Romeo

Blog: https://www.aleadmin.it/
Reply
0 Kudos
IRIX201110141
Champion
Champion
Jump to solution

Just follow KB 1025914 too free up the space for your DB to get vCenter working again. Keep in mind that some additional DB cleanup/merge tasks are needed of you perform a mass delete within a SQL DB.

Normaly my customers sets something between 30-60 days for the retension policy. IIRC VMware sets it to 30 days as default in todays installation. In the early days of Windows vCenter the boxed for limited Task/Events was unchecked.

Regards,

Joerg

---------------------------------------------------------------------------------------------------------

Was it helpful? Let us know by completing this short survey here.

jasmeetsinghsur
Enthusiast
Enthusiast
Jump to solution

The Kb actually resolved the issue as the vCenter database sized got decreased immediately after changing the retention period and executing the store procedure for the VCDB. Wondering if there any sql maintenance job that that runs at its schedule time to purge the stale records automatically.

Thanks,

Jasmeet Singh

Reply
0 Kudos
marvinmarcos
VMware Employee
VMware Employee
Jump to solution

Hi everyone,

This also may shed some light on this issue. It's Insufficient free space for the Database.

Reply
0 Kudos