HCL Workload Automation, Version 9.4

Problem description

The problem occurs because of the way Windows handles its desktop heap memory, and the way HCL Workload Automation creates desktops. In the security context, a desktop is used to encapsulate Windows processes, preventing the process from performing unauthorized activities.

The total amount of memory available for the creation of desktops is determined by a Windows registry entry called:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager
\Memory Managment\SessionViewSize
The default value is 20MB.
The share of that buffer for each desktop is determined by a Windows registry entry called:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager
\SubSystems\Windows 
For example, the value of this entry might be:
%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=
1024,3072,512 Windows=On SubSystemType=Windows ServerDll=basesrv,
1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:
ConServerDllInitialization,2 ProfileControl=Off MaxRequestThreads=16 
In this entry, after the keyword SharedSection, there are three comma-separated memory entries (in KBs):
Common memory (first entry)
Defines the shared heap size common to all desktops (1024 in the example).
Interactive desktop memory (second entry)
Defines the extra desktop heap memory assigned to each interactive process (3072 in the example). For example, the process which is in foreground at the moment. There are normally three interactive processes running at any one time.
Non-interactive desktop memory (third entry)
Defines the extra desktop memory assigned to non-interactive processes (512 in the example). For example, any process running in background.
HCL Workload Automation processes make the following use of desktops:
HCL Workload Automation Netman Windows service
Creates a non-interactive desktop shared between all agents running on the physical computer.
HCL Workload Automation Token Service Windows service
Creates a non-interactive desktop for the TWSUser for each agent.
HCL Workload Automation Windows service
Creates a non-interactive desktop for the TWSUser for each agent.
Job manager (jobmon.exe)
Creates a non-interactive desktop for all jobs launched by each agent.
Thus, for each extra agent, three non-interactive desktops are created. The problem occurs when Windows uses up all the memory for creating desktops.