Skip to main content
Version: 8.1

Perspective Parameters

Session Caching​

Perspective Sessions cache assets (our CSS, JS, fonts, and images) to reduce load times after the first time opening the project. Sessions will cache assets, but some browsers will attempt to re-download assets on refresh. This is mostly controlled by the browser instead of Ignition so there are some important differences between browsers.

Chrome and Safari handle browser cache differently than Edge and Firefox when it comes to hitting the ‘refresh’ or ‘reload’ button. Edge and Firefox both seem to send a request for new copies of the resources with header of max-age=0 instead of pulling from the cache. Navigating via a 'back’ button or entering in the URL bar and pressing ‘enter’ will load from cache. This seems to simply be a design difference by these two browsers, in which both are working as intended.

Caching can be disabled via the following flag:

wrapper.java.additional.1=-Dperspective.gateway.disableClientCaching=true

Alternatively the cacheControl flag can be used to modify aspects of the cache. You can learn more about cache control from the MDN documentation. The example below lists some default values:

wrapper.java.additional.1=-Dperspective.gateway.cacheControl=public,max-age=2419400,no-transform

Route Handling​

New in 8.1.8

The following parameters are used to modify route handling for Perspective Sessions. Most systems will not need to modify these parameters. However increasing the values of these parameters may be helpful in cases where large project updates are sent out to active Perspective Sessions over a spotty network. A low timeout and concurrency in that scenario may result in browser timeouts. If these values are not set, Perspective will use the global routing values instead. See the Web Server section for more details on global routing.

System PropertyDescription
-Dperspective.fetch-concurrencyDetermines the number of concurrency sessions. Defaults to 25.
-Dperspective.fetch-timeoutDetermines the timeout period when receiving project updates. Defaults to 5000 milliseconds.
Example
wrapper.java.additional.1=-Dperspective.fetch-concurrency=25
wrapper.java.additional.2=-Dperspective.fetch-timeout=5000

Web Socket Compression​

You can remove the compression header for perspective web socket connections.

This parameter is generally only used in cases where a Microsoft IIS based firewall is acting like a reverse proxy, and needs to be able to rewrite secure web socket messages.

Example
wrapper.java.additional.1=-Dperspective.ws.disablePermessageDeflateExtension=true

Web Socket Idle Time​

New in 8.1.33

The following parameters allow customization of Perspective session failover redirect timing. Tuning these timeout values makes it possible to detect when a connection is down in a few seconds rather than minutes, and a failover to the backup Gateway can be triggered more quickly. If making changes, be sure idleTimeIntervalMs is less than maxIdleTimeMs.

caution

Do not set these values too low on busy Gateways as they may take time to send messages over the websocket channel because of the amount of tasks, not connection issues.

System PropertyDescription
-Dperspective.client.websocketChannel.maxIdleTimeMsSpecifies the maximum idle time to detect a connection to a Gateway in milliseconds. Default value is 120000.
-Dperspective.client.websocketChannel.idleCheckIntervalMsSpecifies the interval value to trigger a failover to a backup Gateway in milliseconds. Default value is 30000.
Example
wrapper.java.additional.1=-Dperspective.client.websocketChannel.maxIdleTimeMs=30000
wrapper.java.additional.1=-Dperspective.client.websocketChannel.idleCheckIntervalMs=10000

Web Socket Message Size​

New in 8.1.12

The following parameter can be used to specify the maximum web socket message size. Most systems will not need to modify this parameter. Increasing the maximum message size may be helpful if your project includes very large Perspective views.

System PropertyDescription
-Dperspective.websocket.max-message-sizeSpecifies the maximum message size in KB. Default value is 2048.
Example
wrapper.java.additional.1=-Dperspective.websocket.max-message-size=2048

Threadpool Restrictions​

New in 8.1.12

Perspective has two primary threadpools:

  • A worker threadpool (used for long-running, "blocking" work)
  • A queue threadpool (used for short-duration internal tasks)

By default, each of these pools can have an unlimited number of threads with a 60 second keep-alive. The following parameters can be used to fix the number of threads or change the keep-alive period. This can be useful in troubleshooting scenarios when attempting to limit the number of threads.

System Property (Worker)Description
-Dperspective.threadpool.perspective-worker.keep-aliveSpecifies the keep-alive period. Expects an integer, which represents an amount of seconds. When omitted, defaults to 60 seconds. Note that this setting is ignore if pool-size (listed below) is set.
-Dperspective.threadpool.perspective-worker.pool-sizeSpecifies the maximum number of workers as an integer. When omitted, defaults to unlimited.
Example
wrapper.java.additional.1=-Dperspective.threadpool.perspective-worker.keep-alive=40

# These settings are mutually exclusive, so setting both will result in the keep-alive being ignored
# wrapper.java.additional.1=-Dperspective.threadpool.perspective-worker.pool-size=100
System Property (Queue)Description
-Dperspective.threadpool.perspective-queue.keep-aliveSpecifies the keep-alive period. Expects an integer, which represents an amount of seconds. When omitted, defaults to 60 seconds. Note that this setting is ignore if pool-size (listed below) is set.
-Dperspective.threadpool.perspective-queue.pool-sizeSpecifies the maximum number of workers as an integer. When omitted, defaults to unlimited.
Example
wrapper.java.additional.1=-Dperspective.threadpool.perspective-queue.keep-alive=40

# These settings are mutually exclusive, so setting both will result in the keep-alive being ignored
# wrapper.java.additional.1=-Dperspective.threadpool.perspective-queue.pool-size=100

Cache and Share​

New in 8.1.12

Certain bindings and queries in Perspective will often pull data to see if any values have changed. You can influence whether Perspective pulls in cached data or issues a new query by setting the timeout threshold before Perspective executes a new query. In other words, if Perspective fetches data that is within that time frame, the cached value will be used instead of a new, queried value. This timeout value can be modified with the following system property:

System PropertyDescription
-Dperspective.value-cache.max-ageControls how long Cache and Share will keep cached values alive for before Perspective polls for new data. Default is 1 minute.
Example
# "####" is the timeout period for using cached data.
wrapper.java.additional.1=-Dperspective.value-cache.max-age=####