/var/log/vmware/vpxd/vpxd.log YYYY-MM-DDTHH:MM:SS error vpxd[634618] [Originator@6876 sub=Memory checker] Current value <Current_Used_Memory> exceeds hard limit <Assigned_Memory_to_vCenter>. Shutting down process.
YYYY-MM-DDTHH:MM:SS panic vpxd[634618] [Originator@6876 sub=Default]
-->
--> Panic: Memory exceeds hard limit. Panic
--> Backtrace:
--> [backtrace begin] product: VMware VirtualCenter, version: <vCenter_Server_version>, build: build-<build_number_of_vcenter>, tag: vpxd, cpu: x86_64, os: linux, buildType: release
--> backtrace[00] libvmacore.so[0x00531DD5]
--> backtrace[01] libvmacore.so[0x00421834]: Vmacore::System::Stacktrace::CaptureFullWork(unsigned int)
--> backtrace[02] libvmacore.so[0x00434013]: Vmacore::System::SystemFactory::CreateBacktrace(Vmacore::Ref<Vmacore::System::Backtrace>&)
--> backtrace[03] libvmacore.so[0x0050A993]
--> backtrace[04] libvmacore.so[0x0050AAAB]: Vmacore::PanicExit(char const*)
--> backtrace[05] libvmacore.so[0x00421556]: Vmacore::System::ResourceChecker::DoCheck()
--> backtrace[06] libvmacore.so[0x00385107]
--> backtrace[07] libvmacore.so[0x0037EC04]
--> backtrace[08] libvmacore.so[0x00384517]
--> backtrace[09] libvmacore.so[0x00510FC5]
--> backtrace[10] libpthread.so.0[0x00008EB0]
--> backtrace[11] libc.so.6[0x000FFADF]
--> backtrace[12] (no module)
--> [backtrace end]
core.vpxd-worker.#####vimtop" command on the vCenter Server's SSH shows high vpxd memory utilization. vc.vpx_device" and "vc.vpx_stat_counter". The same can be confirmed by logging in to the vCenter Server database and checking the table size information. /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres
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 10;
vc.vpx_device" and "vc.vpx_stat_counter" : relation | total_size
-----------------------------------+------------
vc.vpx_device | 27 GB
vc.vpx_stat_counter | 9555 MB
vc.vpx_usage_stat | 1912 MB
vc.vpx_topn_past_day | 644 MB
vc.vpx_journal_entry | 625 MB
vc.vpx_vm | 513 MB
vc.vpx_host | 458 MB
vc.vpx_hist_stat4_41 | 430 MB
vc.vpx_hist_stat4_40 | 428 MB
vc.vpx_hist_stat4_39 | 426 MB
VMware vCenter Server
Issue happens as the tables within the database are storing the login events from third party applications like backup tool, etc and not getting cleared making vpxd to consume more memory and ultimately crashing.
To clear the events from the above mentioned tables within vCenter Server's database, follow the below steps :
service-control --stop vpxd
/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres
1. delete from vpx_stat_counter where device_id in(select device_id from vpx_device where device_name like '%/SessionStats/SessionPool/Session%');
2. delete from vpx_device where device_name like '%/SessionStats/SessionPool/Session%';
3. vacuum (full, ANALYZE , verbose) vpx_device;
4. vacuum (full, ANALYZE , verbose) vpx_stat_counter;
service-control --start vpxd
vimtop" command and ensure that the memory utilization is not increasing again.