Challenge
If you have more than 100 jobs running simultaneously, if you try to start a few more jobs, they might not start and will show you the following error message:Error Job <JobName> cannot be started. SessionId: <UUID>, Timeout: [361 sec]
Cause
The issue can be easily reproduced when you have 100 Backup Copy jobs, because Backup Copy jobs are always running (in Idle state) and have corresponding running process in the system. The problem is that we hit Desktop Heap limitation, Desktop Heap size for services is much smaller than that for applications.Solution
Increase the Desktop Heap size via registry. This affects the desktop heap of all services ( also known as non-interactive window stations), do not make it larger than necessary:1. Run regedit and navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems
2. Find "Windows" key, it should contain the following data(all in one line):
%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,20480,768 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ServerDll=sxssrv,4 ProfileControl=Off MaxRequestThreads=16
3. Change third Shared Section value only (desktop heap for each desktop that is associated with a "non-interactive" window station), other values please leave intact. New value should look like this:
%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,20480,2048 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ServerDll=sxssrv,4 ProfileControl=Off MaxRequestThreads=16
4. Reboot the machine