Skip to content

Sending commands over OPC Twin takes long the first time #1990

Closed
@NoTuxNoBux

Description

@NoTuxNoBux

Describe the bug
When sending commands through the OPC Twin, we're noticing delays from 8 to 30 seconds before the first command is delivered after connection was previously lost.

To Reproduce

  1. Register OPC Twin with a server that supports commands.
  2. Send a command the first time.
  3. Reboot the OPC UA server.
  4. Wait long enough for the OPC Twin to lose its connection (at least ~60 seconds, I believe).
  5. Send a command through the OPC Twin.
  6. Notice how the twin starts reconnecting because the previous connection went bad, after which it sends the command, but the authentication flow can take up to half a minute on slower servers.

Expected behavior
I'm not sure; perhaps (a flag to) make the OPC Twin reconnect as soon as possible instead of on demand.

Additional context
As part of a demo application, we send a command that reboots the device running the OPC UA server. After the device comes back, the OPC Publisher reconnect ASAP to send back data, but it appears the OPC Twin does not follow this behaviour. Instead, it only seems to reconnect 'on demand' when the first command is passed to it afterwards, which makes sending the command incur a rather large delay.

After this happened, sending the next command (when not rebooting) is much faster, likely because the existing connection is intact.

We are sending commands to the OPC Twin through the IoT Hub API, in case it is relevant.

OPC Twin version 2.8.3.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions