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.

EasyDAClient Time taken to release connection

More
28 Aug 2023 16:45 #12038 by ncorbett
Hello, thanks again for the response.

We have updated to the latest version and can confirm the hold periods are now being correct honoured.

This has allows us to manage the controlled release of subscriptions and connections in a timely manner.

Again, thank you for the support. It has been very helpful.

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

More
16 Aug 2023 18:06 #12019 by support
Hello.

The issue with hold periods being ignored should now be fixed.
Please download QuickOPC 5.71.333 (or later), now available on our Downloads page and on www.nuget.org, and rebuild.

The setting you asked about is static EasyUAClient.SharedParameters.EngineParameters.GarbageCollectionPeriod . Do not set it too fast, though.

Best regards

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

More
16 Aug 2023 16:11 #12016 by ncorbett
Hello,

thank you for your prompt response, it is very much appreciated.

With respect to the dot net versions on which we are executing.

When building the solution we build for the Target framework: ".Net Framework 4.8".

The host on which we execute the application has the following:

OS Name: Windows
OS Version: 10.0.17763
OS Platform: Windows

.NET SDKs installed: 7.0.306

.NET runtimes installed:
• Microsoft.AspNetCore.App 7.0.9
• Microsoft.NETCore.App 7.0.9
• Microsoft.WindowsDesktop.App 7.0.

I also appreciate the insight you have provided regarding the interaction with the "garbage collection" of the open connections. You mention that the period for checking this is also configurable. Which property would be used to configure this?

I look forward to the results of your investigation.

If you have any further questions, please ask.

Kind Regards,

ncorbett.

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

More
16 Aug 2023 12:55 #12011 by support
Hello,
one more question: Which .NET runtime are you running? (.NET Framework 4.7/4.8, or .NET 6/7? )

Thank you

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

More
15 Aug 2023 17:48 #12001 by support
Hello.

You are doing it right. I have made a test and was able to reproduce the issue - i.e. the hold period change appeared to have no effect.
We will investigate and I will post an update here when I know more.

One note: The component checks periodically whether any open connections can be closed ("garbage collection"). The period is also configurable, and default to (I think 2) seconds.
This means that with this default garbage collection period, if the hold period was e.g. 500 milliseconds, the actual time to close will vary between 0.5 and 2.5 seconds. This is by design. But it is not the issue you are observing.

Best regards

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

More
15 Aug 2023 08:22 #11994 by ncorbett
Good Morning,

Software version: OpcLabs.QuickOpc Nuget Package: 5.71.123

We are using an EasyDAClient instance to connect with a Server where we do the following:

a) Register and verify our license using the RegisterManagedResourceWithExistenceCheck()
This is successful.

b) Register a callback with ItemChanged for change notifications for subscriptions.

c) Subscribe for change notifications using SubscribeMultipleItems(…)

d) We also perform on demand writes using: WriteMultipleItemValues(…)

e) We also perform on demand reads using: ReadMultipleItems(…)

We appreciate with EasyDAClient the connection is maintained on demand where it will be established by the library to support each of the activities above, namely subscription, write and read, and subsequently released when its not required.

We have the requirement to release the connection and we do this by:
• Ensuring no calls are made to read or write methods.
• Unsubscribe calling UnsubscribeAllItems()

When we do this we observe that the connection is eventually released, however it takes approximately 30 seconds for the connection to be released.

The documentation here:

EasyDAClientHoldPeriods Class Members (doc-that.com)

refers to Hold periods, ItemDetach, ServerDetach, TopicRead & TopicWrite. We have set these to a range of different values, ranging from 5 seconds to 40 seconds and have observed no change in the time taken to release the connection.

Please note:
• we ensure the Hold Period Instance parameters are set immediately after the EasyDAClient is constructed before any read/write or subscription calls are made.
• we appreciate the value for the hold periods is in milliseconds.

Could you please confirm:

• How we can release the connection in a timely manner?
• Can the time to release the connection be configured using the documented Hold Period Instance Parameters discussed above?

Kind Regards, ncorbett.

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

Moderators: support
Time to create page: 0.066 seconds