QuickOPC-UA Timeout Settings: Difference between revisions

From OPC Labs Knowledge Base
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:OPC UA]]
[[Category:OPC UA]]
= Overview =
= Overview =
The table below summarizes the timeout parameters used in OPC UA client-server communication.
{| class="wikitable"
{| class="wikitable"
!Parameter<ref name="verification">The parameter names and default values were verified with QuickOPC 2020.2.</ref>
!Parameter<ref name="verification">The parameter names and default values were verified with QuickOPC 2020.2.</ref>
Line 38: Line 39:
|A maximum time a server discovery can take (in milliseconds).
|A maximum time a server discovery can take (in milliseconds).
|-
|-
|colspan="3" style="font-style: italic; color:#e76700;"|'''in SDK configuration'''
|colspan="3" style="font-style: italic; color:#e76700;"|'''in SDK configuration''': (none)<ref name="OperationTimeout"/>
|-
|colspan="3"|(none)<ref name="OperationTimeout"/>
|}
|}


Documentation on how to modify the parameters that are set in the SDK configuration: [http://opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%27s%20Guide%20and%20Reference-QuickOPC/webframe.html#OPC%20UA%20Application%20Configuration.html User's Guide: OPC UA Application Configuration]
Documentation on  
* how to modify the parameters that are set from the code: [http://opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%27s%20Guide%20and%20Reference-QuickOPC/webframe.html#Parameter%20Objects.html User's Guide: Parameter Objects]
* how to modify the parameters that are set in the SDK configuration: [http://opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%27s%20Guide%20and%20Reference-QuickOPC/webframe.html#OPC%20UA%20Application%20Configuration.html User's Guide: OPC UA Application Configuration]


Note that there are also several timing-related parameters that are not truly timeouts, for example:
Note that there are also several timing-related parameters that are not truly timeouts, for example:

Latest revision as of 13:22, 29 July 2021

Overview

The table below summarizes the timeout parameters used in OPC UA client-server communication.

Parameter[1] Default value[1] Description
in UAClientSessionParameters
CloseTimeout 10 000 A timeout for closing the session (in milliseconds).
EndpointSelectionTimeout 30 000 A timeout for endpoint selection (in milliseconds).
OperationTimeout[2] 120 000 Timeout used when sending requests (in milliseconds).
SessionConnectTimeout 60 000 A session connect timeout (in milliseconds).
SessionTimeout 60 000 A session timeout (in milliseconds).
SessionTimeoutDebug 600 000 A session timeout used when a debugger is attached (in milliseconds).
in UADiscoveryParameters
DiscoveryTimeout 15 000 A maximum time a server discovery can take (in milliseconds).
in SDK configuration: (none)[2]

Documentation on

Note that there are also several timing-related parameters that are not truly timeouts, for example:

  • UAClientSessionParameters.KeepAliveInterval
  • UAClientSessionParameters.KeepAliveIntervalDebug
  • UAClientSessionParameters.RetrialDelay
  • UASmartSessionParameters.HoldPeriod

SessionParameters.CloseTimeout

A timeout for closing the session (in milliseconds).

This parameter is not interpreted by the component; it is simply passed down to the OPC UA Stack for processing.

If the session cannot be closed in a timely manner, it is consider closed anyway, and the component will not use the same session again. The timeout prevents the component from waiting too long or indefinitely for the confirmation. This means that any new requests to the same endpoint will open a new session, as with the properly closed sessions.

SessionParameters.EndpointSelectionTimeout

A timeout for endpoint selection (in milliseconds).

This is actually an operation timeout that is used when selecting the server endpoint (for the OPC UA GetEndpoints service call, which happens at the beginning of the connection process, before the normal session is open). The default is intentionally shorter than the normal operation timeout, so that the inability to select the endpoint causes the connection to fail in a reasonable time.

SessionParameters.OperationTimeout

Timeout used when sending requests (in milliseconds).

This parameter is not interpreted by the component; it is simply passed down to the OPC UA Stack for processing. It determines how long the stack waits for a response after sending a request.

This parameter controls the operation timeout for majority of OPC UA operations. Some operations (such as endpoint selection, or closing the session) may use a different value for their operation timeout, controlled by a different parameter.

SessionParameters.SessionConnectTimeout

A session connect timeout (in milliseconds).

This parameter controls the total time given to the connection process (including endpoint discovery and selection, creating secure channel etc.). If the underlying connection process exceeds the given time, an error occurs and is returned to the caller. Even if this connection process later succeeds, its results will not be used.

SessionParameters.SessionTimeout

A session timeout (in milliseconds).

This parameter is not interpreted by the component; it is simply passed down to the OPC UA Stack for processing.

The value of this parameter is only used if no debugger is attached to the process. Otherwise, the value from SessionTimeoutDebug parameter is used.

CreateSession Service Parameters, RequestedSessionTimeout: "Duration. Requested maximum number of milliseconds that a Session should remain open without activity. If the Client fails to issue a Service request within this interval, then the Server shall automatically terminate the Client Session."

SessionParameters.SessionTimeoutDebug

A session timeout used when a debugger is attached (in milliseconds).

This parameter controls the same behavior as the SessionTimeout parameter, but the component uses it when the program is being debugged in the debugger. The default value is quite long, significantly longer than that of the SessionTimeout parameter. This allows the developer to reasonably debug the OPC UA program using e.g. breakpoints. Without prolonging the session timeout, "pausing" the program in the debugger (which means that communication is stopped temporarily) would cause the OPC UA server to detect the session as "broken", resulting in a disconnection of the OPC UA communication. With the long session timeouts, the OPC UA server will allow the client not to communicate permanently, giving the developer a chance to use breakpoints and pause the program as needed.

Note that the the actual session timeout that will be used is negotiated between the OPC UA client and OPC UA server. The value of this parameters is only a "request" from the client side, and can be revised by the server - the server has the final word.

DiscoveryParameters.DiscoveryTimeout

A maximum time a server discovery can take (in milliseconds).

This is actually an operation timeout that is used when making server or endpoint discovery operations (such as the OPC UA FindServers and FindServersOnNetwork service calls).

  1. 1.0 1.1 The parameter names and default values were verified with QuickOPC 2020.2.
  2. 2.0 2.1 Before QuickOPC 2021.3, the OperationTimeout was configurable in the SDK configuration.