When attempting to modify a Provider vDC within VMware Cloud Director, you may encounter an error that prevents the modification from completing.
The following error message is observed in the UI or logs:
org.postgresql.util.PSQLException: ERROR: canceling statement due to statement timeout
Stack traces in the logs indicate that this timeout occurs specifically when Cloud Director is loading the storage class for the Provider vDC.
VMware Cloud Director
PostgreSQL Database
The PostgreSQL database is taking longer than the default 30-second timeout to retrieve the information for the Provider vDC. Because the database cannot retrieve the information quickly enough, the Cloud Director statement times out.
To resolve this issue, you must optimize the PostgreSQL database to ensure old records are cleaned up and the SQL execution plan uses the best indexes to run the select statement.
Connect to your PostgreSQL database server.
Log into the vcloud database.
Run the following optimization commands:
vacuum full;
reindex database vcloud;