Knowledge Base

Enter search queries below or use the tag links to the right to browse the knowledge base by category (Show All Tags).

Starting new instances of Robo-FTP in service session fails

Even when running as a service, Robo-FTP uses window handles. So, it requires a little desktop heap space per instance. If you are running many instances you can run out of desktop heap space. In recent versions of Windows non interactive sessions by default have a very small desktop heap of just 512 KBs. Our experience has shown us that this allows about 30 instances of Robo-FTP. After that, creating new instances can start to fail.

This issue can affect both Robo-FTP when running as a service and Robo-FTP Server when using Server Event Scripts.

Your symptoms may vary, but can include the following:

  • (Robo-FTP Server) RoboDaemonFTP crashes when trying start a new instance when many instances are already running (server log will show "could not start automation services" error)
  • (Robo-FTP) Robo-FTP crashes when trying to start a new Robo-FTP service when many Robo-FTP services are already running (debug log will show "can't create main window" error)

To fix this you can raise the non interactive session heap size.

The size of each desktop heap allocation is controlled by the following registry value:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SubSystems\Windows

The default data for this registry value will look something like the following (all on one line):

%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

The numeric values following "SharedSection=" control how desktop heap is allocated. These SharedSection values are specified in kilobytes.

The first SharedSection value (1024) is the shared heap size common to all desktops. This memory is not a desktop heap allocation, and the value should not be modified to address desktop heap problems.

The second SharedSection value (3072) is the size of the desktop heap for each desktop that is associated with an interactive window station, with the exception of the “Disconnect” and “Winlogon” desktops.

The third SharedSection value (512) is the size of the desktop heap for each desktop that is associated with a "non-interactive" window station. If this value is not present, the size of the desktop heap for non-interactive window stations will be same as the size specified for interactive window stations (the second SharedSection value).

The third SharedSection value should be increased to allow more instances of Robo-FTP to run as a service. Doubling it to 1024 should provide enough headroom for all the Robo-FTP instances you may need to run.

You must reboot the computer for these changes to take effect.

Article last updated: 2021-01-05

Tags: Robo-FTP, Service, RoboDaemonFTP