CONTAP-751146: mgwd virtual memory grows over time due to counter manager REST worker thread resource exhaustion
Issue
- On clusters where the ONTAP counter manager REST API endpoints (/api/cluster/counter/tables/*/rows) are polled frequently — by tools such as NetApp Harvest (RestPerf), ActiveIQ Unified Manager, CheckMk, or custom REST clients — the mgwd process may grow in virtual memory size over time until it exhausts its 4 GB virtual address limit and crashes.
- The following EMS messages appear as mgwd approaches the limit:
kern.vm.mmap.return:notice: mmap(2) by mgwd (pid <pid>) for size <N> failed: VMEM limit exceeded, limit 4294967296, error 12.
- After exhaustion, mgwd crashes and is automatically restarted by spmd. The restart resolves the condition temporarily but virtual memory growth resumes. The time to exhaustion depends on poll frequency and the number of performance counter instances (volumes, LUNs, SVMs, qtrees, etc.) on the cluster.
- This issue is related to CONTAP-702448. See also:
[https://kb.netapp.com/on-prem/ontap/...CONTAP-702448]
