Skip past navigation linksSecure Global Desktop 4.40 Administration Guide > Users and Authentication > Increasing the Launch Timeouts in the Login Scripts

Increasing the Launch Timeouts in the Login Scripts

If you run applications on a particularly slow application server, SGD might fail to start the applications and report a ErrApplicationServerTimeout error.

You can fix this by increasing the launch timeouts in the vars.exp login script.

The launch timeouts can be divided into Expect timeouts, client timers, and other timeouts.

If the application server is slow, increase the Expect timeouts first. If the launch still fails, one of the client timers might be too short. If the launch is particularly slow, increase all the client timers.

Increasing the launch timeouts slows down application start times. Only change the launch timeouts if you are experiencing problems, and tune the timeouts to the capabilities of the application server.

Note None of the timeouts discussed on this page, apart from the Execution Protocol Engine timeout, apply when launching a Microsoft Windows application that is configured to use the Microsoft RDP protocol.

Expect Timeouts

The following table lists the available Expect timeouts and their default values.

Timeout Default Value
timeouts(hostprobe) 30 seconds
timeouts(prelogin) 40 seconds
timeouts(loggedin) 20 seconds

If an Expect timeout expires, the script attempts to guess the prompt, and then continues with the launch.


The timeouts(hostprobe) timeout is called by the unix.exp login script. This is the time to wait for a response from the ttahostprobe binary. The ttahostprobe binary is used to check whether an application server is available.

The ttahostprobe binary outputs its response to standard output (stdout), and returns y for success or n for failure.


The time allowed for each Expect command to match a required string during the login phase.

For example, after the connection is made to the application server, the script has 40 seconds (the default value of timeouts(prelogin)) to match the login prompt before it times out. Every successful match resets the timer. During a login, the timeout is usually reset for the login prompt, the password prompt, and the shell prompt.

Increasing this timeout increases the time allowed for each phase of the login. This timeout must be large enough to allow for the longest phase of the login to be completed.

If the timeout expires, the script assumes that it is logged in and has failed to match the shell prompt and sends "echo SYNC" to the application server to guess the prompt string. If the user is not logged in when the timer fires, the application launch fails. Otherwise, the shell prompt is set to whatever the application server sent immediately after the "echo SYNC" and the launch continues.

Note If you see "echo SYNC" and the shell prompt ends in the normal way with $, %, #, or >, the timeouts(prelogin) value is too short.


The time allowed for each Expect command to match a required string once the user is logged in.

If the timeout expires, the script moves on to the next command, which can cause commands to be sent before the prompt has returned.

The most common occurrence of this timeout is if the script incorrectly sets the shell prompt. This causes each command to wait 20 seconds (the default value of timeouts(prelogin)) before moving to the next command and can trigger one of the client timers.

Client Timers

Client timers are set using the SGD clienttimer Tcl command. If a client timer expires, the application launch is canceled with a fatal ErrApplicationServerTimeout error.

The following table lists the available client timers and their default values.

Timer Default Value
timers(login) timeouts(prelogin) + 10
timers(env) 40 seconds
timers(runmain) 40 seconds
timers(build) 25 seconds
timers(total) 5 seconds


The total time for the complete login phase, from making the connection to receiving the first shell prompt.

The timers(login) timer must be large enough to cover all of the login phases. Each individual phase of the login (login prompt, password prompt, shell prompt) might last up to the number of seconds defined for the timeouts(prelogin) timeout. The value of this timer must always be greater than timeouts(prelogin).

If you increase the timeouts(prelogin) timeout, increase the timers(login) timer as well so that the difference between them is never less than 10.


The total time from receiving the first shell prompt until all of the application server environment variables have been exported.


The total time from setting the last environment variable to launching the main application.


The total time taken to build the command line to be executed. This timer is only used when launching Windows applications that use the SCO Merge protocol.

Note The SCO Merge protocol is no longer supported and can only be used by legacy Windows application objects.


The total number of client timers. Only change this setting if you add or remove a client timer.

Other Timeouts

The procs.exp login script includes a 3-second timeout when issuing commands. This is defined in the proc wait_for_prompt procedure.

The Execution Protocol Engine has a default timeout of 180 seconds (3 minutes). This timeout is started when the launch request is received and removed when the launch has successfully completed. If it expires, the launch is canceled. This timeout is specific to each SGD server. Use the following command to change this timeout:

Skip past command syntax or program code$ tarantella config edit \
  --tarantella-config-execpeconfig-maxlaunchtime secs

Note Use the --array option with this command to change this timeout for all the SGD servers in the array.

Related Topics