fix(opcuaclient): split the per-endpoint connect budget into reachability + session phases (#912)
PerEndpointConnectTimeout (3 s) now bounds only TCP + discovery, so failover past a dead endpoint stays fast. The new SessionCreateTimeout (10 s) bounds OpenSecureChannel + CreateSession on an endpoint that answered discovery, where the client-side cert and crypto work lives (#910). 2 x (3 + 10) s stays inside the host's 30 s initialise bound. Expiries name the budget that ran out; both budgets must be positive; AdminUI form carries the new field so a save does not drop it; driver docs updated. Closes #912
This commit is contained in:
@@ -75,10 +75,16 @@ measurements; they are not fresh SDK 2.0.1 interoperability evidence.
|
||||
`EndpointUrls` (a list) takes precedence over the single-URL `EndpointUrl` and
|
||||
provides ordered **failover** — the driver tries each candidate in turn at every
|
||||
`InitializeAsync` (including the comms-loss watchdog's re-initialise), and the first to connect wins (e.g. a hot-standby pair on
|
||||
4840 / 4841). Each candidate gets `PerEndpointConnectTimeout` (default 3 s) for discovery + secure channel + session. That
|
||||
budget includes **client-side** work (certificate load/validation, the asymmetric handshake), so a cold process on a busy
|
||||
host can exceed it against a healthy server; an expiry is reported as `TimeoutException: … PerEndpointConnectTimeout (3 s)`
|
||||
(#910 — the SDK alone says `BadRequestInterrupted`, which reads like a server fault). See
|
||||
4840 / 4841). Each candidate's connect runs in **two separately bounded phases** (#912):
|
||||
`PerEndpointConnectTimeout` (default **3 s**) covers TCP + endpoint discovery, so a dead or unreachable candidate is
|
||||
passed over in about 3 s; `SessionCreateTimeout` (default **10 s**) then covers OpenSecureChannel + CreateSession +
|
||||
ActivateSession on an endpoint that answered discovery. The session phase carries the **client-side** work (certificate
|
||||
load/validation, the asymmetric crypto of a secured handshake), which a cold process on a busy host can stretch past 3 s
|
||||
against a healthy server (#910). The larger budget only costs time when an endpoint answers discovery and then stalls —
|
||||
not when it is down. The defaults keep two such candidates (2 × (3 + 10) s) inside the host's 30 s initialise bound;
|
||||
raise either per driver if your topology needs it, keeping that sum in mind. An expiry is reported by the budget's name,
|
||||
e.g. `TimeoutException: … SessionCreateTimeout (10 s)` (#910 — the SDK alone says `BadRequestInterrupted`, which reads
|
||||
like a server fault). The AdminUI browse picker still uses one combined budget (`PerEndpointConnectTimeout` clamped to 5–30 s). See
|
||||
`src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Contracts/OpcUaClientDriverOptions.cs`
|
||||
for every field (security policy/mode, auth type, session timeout, keep-alive,
|
||||
browse root, node/depth caps). `ReconnectPeriod` was **deleted** (#676 — unused since #670 removed the SDK reconnect
|
||||
|
||||
Reference in New Issue
Block a user