Large GraphPathHash class as a key in the HashMap cached in the Gemfire region causes out of memory


Parallel runs in SAS® Regulatory Risk Management (on SAS® 9.4) do not progress because SAS® Infrastructure for Risk Management Server runs out of JVM heap memory. The expanded heap contains 19.9 GB out of the large chunk of retained heap (16.8 GB) within the SAS Infrastructure for Risk Management Server distributed Gemfire region map. 

A single-token HashMap consists of a node table, which contains increasingly pinned, very large character key-value pairs that appear to be duplicated. This causes the error to occur:

2023-01-27 10:01:25,372 [Timer-13] INFO  [unknown] com.sas.solutions.risk.irm.server.taskexec.SASIOMWorkspaceHolder - Destroying workspace from index 1.

2023-01-27 10:01:56,281 [JobFlowInstanceSweeper-1001] INFO  [unknown] com.sas.solutions.risk.irm.server.admin.JobFlowInstanceSweeper - Done running jobflow instance sweeper: 0

java.lang.OutOfMemoryError: Java heap space

Dumping heap to java_pid63138.hprof ...

Heap dump file created [23369597625 bytes in 71.592 secs]

Exception in thread "Timer-3" SystemFailure Watchdog: [warning] failure detected

java.lang.OutOfMemoryError: Java heap space

Exception in thread "TimeScheduler.Thread" Exception in thread "com.sas.svcs.cluster.balance.StickyRandomPolicy Timer 1"

Workaround

Apply the latest SAS Infrastructure for Risk Management hot fix: https://tshf.sas.com/techsup/download/hotfix/HF2/G2T.html#G2T018