logo
23.2
search
No matching documents found.
list
search
No matching documents found.
logo
Please be aware that there is newer version of documentation available for Webswing. Documentation 24.2

Idle Instances

This feature allows you to define a number of instances (sessions) to be started before user requests to start a new instance. The purpose of idle instances is to reduce the time user has to wait for the JVM startup. You can configure how many idle instances should be available at all times in app config in Admin Console. Note that idle instance is application specific. The startup of idle instance stops right before calling the main class defined in the app launch configuration. The main class of your app will be called after the user requests a new instances.

Idle instances config

You can see a list of currently running idle instances in Sessions view.

Idle instances list

When you change your app's configuration, idle instances are automatically recreated.

Restrictions

There are some restrictions for usage of idle instances. Since the idle instance is started before user requests the instance, it is not possible to use user supplied variables in the following configuration parameters:

  • userDir
  • javaFxClassPathEntries
  • javaVersion
  • jreExecutable
  • vmArgs
  • classPathEntries
  • sessionLogFileSize
  • sessionLogMaxFileSize

If you have any user supplied variables during an idle instance startup, you will see a warning in logs, which tells you which variable could not be replaced so that you can fix it.

If you need user supplied data to be available as system properties during the call of your main class, please use launcherSystemProperties configuration property in app config.

Cluster

In cluster environment the number of idle instances configured applies to a session pool. If you configure 3 idle instances, every session pool will create 3 idle instances. If you want to restrict the number of idle instances for a session pool, you can change the value of sessionpool.instances.maxIdle parameter in webswing-sessionpool.properties. You can also disable idle instances for a specific session pool with sessionpool.idleAllowed parameter.

You can see the number of idle sessions running in session pool in Overview.

Idle instances overview