Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

Timeouts, reconnections

More
29 Jul 2021 13:33 #10069 by support
Replied by support on topic Timeouts, reconnections
An updated, enhanced Knowledge Base article on OPC UA timeout settings: kb.opclabs.com/QuickOPC-UA_Timeout_Settings .

Please Log in or Create an account to join the conversation.

More
15 Jun 2012 11:39 #891 by support
W.,

[...] For 3 out of 4 parameters, the behavior is not actually implemented by our component, but is inside the OPC UA Stack, so I had [...] use quotations from the OPC specs. Below I am providing a copy of the existing reference documentation (in black), plus a new information (in green) that will also be included in the new builds.


UAClientSessionParameters.KeepAliveInterval Property: www.opclabs.com/onlinedocs/QuickOpcUA/1.00/Reference/html/93...69d-c9b0-fe45-406e8258cfc5.htm
How frequently the server is pinged to see if communication is still working (in milliseconds).
Field Value
Frequency in milliseconds, or Infinite to disable the keep alive monitoring.
Remarks
This interval controls (but does not directly mean) how much time elapses before a communication error is detected.

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

Subscription Service Set: "When there are no Notifications to send within the keep-alive time interval, the Server sends a keep-alive Message … . If a Client fails to receive a Message after the keep-alive interval has expired, or if it determines that it has missed a Message, it can request the Server to resend one or more Messages."



UAClientSessionParameters.Timeout Property: www.opclabs.com/onlinedocs/QuickOpcUA/1.00/Reference/html/ed...3b1-c81c-3484-4210429195e8.htm

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

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."



UAClientSessionParameters.RetrialDelay Property: www.opclabs.com/onlinedocs/QuickOpcUA/1.00/Reference/html/2d...2ab-1a86-70ea-c09f467263ff.htm

A delay before the component will try to reconnect the session, if it failed to connect it previously, or a serious failure occurred related to the session (in milliseconds).

The reconnection will be done by the component automatically, as long as there are any open subscriptions, or an explicit UA operation is requested. The static EasyUAClient.RetryAll method can be used to force a retrial on all objects that are in a failute state.



UAClientSessionParameters.CloseTimeout Property: www.opclabs.com/onlinedocs/QuickOpcUA/1.00/Reference/html/51...4c0-f2c6-a56c-3a773c8ccc39.htm

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.

If more explanation is needed, let me know.

Best regards,
Zbynek Zahradnik

[.....]

From: W.
Sent: Friday, June 08, 2012 4:17 PM
To: Zbynek Zahradnik
Subject: RE: OPC UA Questions

Hello Zbynek,

I figured out #2.


EasyUAClient.SessionParameters.KeepAliveInterval = 1000;
EasyUAClient.SessionParameters.Timeout = 10000;
EasyUAClient.SessionParameters.RetrialDelay = 5000;

EasyUAClient eServer = new EasyUAClient();

I would still like to understand the properties I mentioned before if you have a chance.

Thanks,

W.

From: W.
Sent: Friday, June 08, 2012 10:03 AM
To: 'Zbynek Zahradnik'
Subject: RE: OPC UA Questions

Hello Zbynek,

[.....] The component is reconnecting just fine. Their problem is the length it takes to actually reconnect. This is obviously controlled by the RetrialDelay property.

So I have two questions for you.

1. The customer puts a breakpoint in the code and stops for about 5-10 seconds. This causes the connection to be lost. My problem with that is the Timeout is 1 minute. The KeepAlive is defaults to 5000. Could missing 1 KeepAlive cause this behavior? The exact error is “BadNoCommunication”. I guess I am trying to understand if the behavior he is seeing matches your expectations. A quick explanation of the functions of Timeout, CloseTimeout, KeepAlive and RetrialDelay would be very useful for me [.....] to understand. Do you have this information?
2. I understand we can create an UAClientSessionParameters object and assign the properties mentioned above. How do we then assign that UAClientSessionParameters object to the EasyUAClient object we already have? For example:

We have:

EasyUAClient eServer = new EasyUAClient();

UAClientSessionParameters myParams = new UAClientSessionParameters();
myParams.KeepAliveInterval = 1000;
myParams.Timeout = 10000;
myParams.RetrialDelay = 5000;

//Now what do we do?

Is there any extra code we have to do to be sure the client object knows about these setting changes? Please let me know.

Thanks,

W.

From: Zbynek Zahradnik
Sent: Thursday, June 07, 2012 4:04 AM
To: W.
Subject: RE: OPC UA Questions

W.,

The component is supposed to do these reconnects. If it is not doing them, or if you need more help figuring out the details about where the BadNoCommunication is coming from, let me know.

[.....]

Best regards,
Zbynek Zahradnik

From: W.
Sent: Tuesday, June 05, 2012 2:12 PM
To: Zbynek Zahradnik
Subject: RE: OPC UA Questions

Zbynek,

Thank you for the answers. [....]

The customer is seeing intermittent errors of BadNoCommunication when talking with the TOP Server. That is why he wanted to disconnect and reconnect. If the component already does this re-connect we will look for other reasons this error is occurring.

W.

From: Zbynek Zahradnik
Sent: Sunday, June 03, 2012 7:11 AM
To: W.
Subject: RE: OPC UA Questions

W.,

There are various timeouts in the UA product, too. In version 1.00, there is currently one major difference from the “classic” product: There are no configurable operation level timeouts, e.g. you cannot choose that your Read might take maximum say 5 seconds duration. The operation still may time out at some point, but that is done by the underlying UA stack and is not much configurable. Operation-level timeouts may come in some future version. Good news are that there is already a “hold period” parameter – see in the list below.

Certain important time-related parameters that you can influence in version 1.00 are (more exist I have not considered them relevant at this point):

· EasyUAEngineParameters.DiscoveryTimeout: A maximum time a server discovery can take (in milliseconds).
· EasyUAEngineParameters.SessionHoldPeriod: After a session object is released, it will be maintained at least for the time period specified here. In milliseconds.
· UAClientSessionParameters.RetrialDelay: A delay before the component will try to reconnect the session, if it failed to connect it previously, or a serious failure occurred related to the session (in milliseconds).
· UAClientSessionParameters.Timeout: A session timeout (in milliseconds).


In version 1.00, you cannot force a living session to be disconnected and then reconnected. What would be the use case for it?
The failed sessions are detected and reconnected automatically (same as in the “classic” version). Objects that are already in failure state can be forced to reconnect (if possible) by calling the static EasyUAClient.RetryAll method, but that does not first disconnect the sessions that appear to be working fine.

Regards,
Zbynek Zahradnik

From: W.
Sent: Friday, June 01, 2012 10:44 PM
To: Zbynek Zahradnik
Subject: OPC UA Questions

Zbyenk,

I have a few questions for you about Data.NET UA.

1. Are there any default timeouts (like HoldPeriods) in the UA version? If so how can you handle it and change the timeout?
2. Is there a way to disconnect and reconnect the UA connection?

Thanks,

W.

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.176 seconds