vmware-vcd service restarts unexpectedly.'dmesg -T | grep "Out of memory' shows that processes are being killed by the Out of Memory Killer (oom-kill) like this example:[yyyy-mm-dd hh:mm:ss] Out of memory: Killed process 406### (systemd-cgroups) total-vm:356kB, anon-rss:4kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:32kB oom_score_adj:0[yyyy-mm-dd hh:mm:ss] Out of memory: Killed process 406### (postgres) total-vm:6581520kB, anon-rss:69464kB, file-rss:0kB, shmem-rss:1248152kB, UID:1002 pgtables:12660kB oom_score_adj:-200/opt/vmware/vcloud-director/logs/cell.log:yyyy-mm-dd hh:mm:ss | INFO | vmware-vcd-cell runningyyyy-mm-dd hh:mm:ss | INFO | vmware-vcd-cell runningyyyy-mm-dd hh:mm:ss | ALERT | vmware-vcd-cell is dead but /var/run/vmware-vcd-cell.pid exists, attempting to restart ityyyy-mm-dd hh:mm:ss | INFO | Started vmware-vcd-cell (pid=######)yyyy-mm-dd hh:mm:ss | WARN | wget failed, return code: 4, will retry in 30 secondsyyyy-mm-dd hh:mm:ss | WARN | Server status returned HTTP/1.1 5mmyyyy-mm-dd hh:mm:ss | WARN | Server status returned HTTP/1.1 5mmyyyy-mm-dd hh:mm:ss | INFO | vmware-vcd-cell runningyyyy-mm-dd hh:mm:ss | WARN | Server status returned HTTP/1.1 5mmyyyy-mm-dd hh:mm:hh | WARN | wget failed, return code: 4, will retry in 30 secondsyyyy-mm-dd hh:mm:ss | WARN | wget failed, return code: 4, will retry in 30 secondsyyyy-mm-dd hh:mm:hh | WARN | wget failed, return code: 4, will retry in 30 secondsyyyy-mm-dd hh:mm:ss | ALERT | https://<cell-ip>:###/api/server_status output is unexpected, output=[Spider mode enabled. Check if remote file exists.--yyyy-mm-dd hh:mm:hh-- https://<cell-ip>/api/server_statusConnecting to <cell-ip>:###... failed: Connection refused.]yyyy-mm-dd hh:mm:ss | ALERT | vmware-vcd-cell is up but attempting to fetch "https://<cell-ip>:###/api/server_status" failed 3 times, rc=4, attempting to restart cellVMware Cloud Director 10.6.x
This issue occurs due to a combination of high API traffic and default connection pool behavior:
Perform the following steps on all VMware Cloud Director cells in the server group:
root.cp /opt/vmware/vcloud-director/etc/global.properties /opt/vmware/vcloud-director/etc/global.properties.bak/opt/vmware/vcloud-director/etc/global.properties using a text editor (e.g., vi or nano).database.pool.minEvictableIdleTimeMillis=6000
database.pool.timeBetweenEvictionRunsMillis=30000 minEvictableIdleTimeMillis sets the minimum time an object may sit idle in the pool before it is eligible for eviction, timeBetweenEvictionRunsMillis sets the interval between eviction thread runs.systemctl restart vmware-vcdtop or vcloud-container-debug.log to verify that memory utilization stabilizes and idle database connections are properly cleaned up.