Skip to main content

When the connection is lost

The run screen receives all values over one live connection to the server. If that connection is lost, for example because the network is down or the server restarts, the screen does not go blank: it keeps the last values, shows that they are no longer current and reconnects by itself.

What you see​

A large banner appears at the top centre of the screen when the connection is lost. It flashes orange and red every second so that nobody works with old values; with the reduced motion setting of the operating system it stays red.

BannerMeaning
Large, flashing: No server connection — data is not up to date (last update HH:MM:SS). Reconnecting…The connection is lost; the time is the last update received
Small, blue: Connected — refreshing data…The connection is back and the current values are being loaded
Small, red: This server requires a session — sign in.The server closed the connection because you are not signed in
Small, red: N signals cannot be shown (server subscription limit ws_max_subscriptions). 30 s until the next retry.The server refused some signals because of its limit; YTCC retries after 30 seconds

The banner does not block the screen: you can still navigate, open popups and read the values.

The screen notices a lost connection within about 3.5 seconds, also when a network cable is pulled and the browser gets no error. The server sends a signal every second; when nothing arrives for 3 seconds, the screen treats the connection as lost and reconnects. Support can change these times with ws_heartbeat_ms (default 1000), ws_stale_ms (default 3000) and ws_idle_timeout_secs (default 10) in config\gateway.toml.

Values while disconnected​

  • Every value keeps its last known number or state, but its status becomes not connected: objects show the communication failure color of your project, as when a device stops communicating. See Read values and states.
  • Scripts read the quality as a communication failure.
  • Alarms, history and server scripts are not affected: they run on the server and continue.

Commands while disconnected​

Commands are refused at once and never queued, so nothing is sent later without your knowledge. The message is Sunucu bağlantısı yok — komut gönderilmedi (No connection to the server — command not sent); while the values are being refreshed it is Data is refreshing — try again in a few seconds. A popup with command buttons shows No server connection — commands cannot be sent over its content.

Reconnecting​

YTCC tries to reconnect by itself, first after a fraction of a second and then with growing pauses of at most about 30 seconds, for as long as the screen is open. When the connection is back it requests all values of the screen again; the page is not reloaded, so open popups and entered text are kept. When all values have arrived the banner disappears.

If the server requires a sign-in and your session has expired, the screen retries every 60 seconds; sign in again.