Hi,
I've looked at the following posts for some guidance:
Error after 100,001 tags are added to Data Client
Subscribing to a large number of tags, in parallel
Subscribing and reading large number of tags
Design Question / Rely on automatic subscriptions or subscribe manually?
However I'm still unclear what is the best approach for subscribing to a large number of tags.
I'm using:
- QuickOPC nuget package version 5.59.492
- Windows 10 version 1809 build 17763.1697
- our application is targeting .NET Core 3.1 running as a windows service.
In our test environment, we have around 100 assets (nodes) having 50 tags each. We need to subscribe to approximately 5000 tags in total with 1 second refresh rate, and we'd like the application to start up and subscribe to these tags as quickly as possible so we're currently trying to do it in parallel.
pseudocode
The code uses a single instance of EasyDAClient and it's not isolated.
What I'm observing is that the approach shown above takes many minutes to complete and causes numerous timeouts on the server. It's rare that I can successfully launch our application with just 50 asset nodes (~2500 tags). Most of the time the Browse() and Subscribe() connections timeout and throw exceptions. I've tried to increase the various browsing related EastDAClientTimeout values, but that just means it takes longer and in most cases it still times out. So I've tried to do it differently by doing the following:
pseudocode
The browsing is reasonably faster (presumably because there's less contention from Subscribe() calls), and the subscription is complete. But if we launch the app to subscribe to 50 asset nodes (~2500 tags) I begin to get errors from the subscription handler about the received message size in what appears to be the underlying WCF client:
The stacktrace for the above error is attached.
I've also tried to just do everything synchronously and just walk the server hierarchy by getting all the nodes and tags in one long operation (no parallelism), and then subscribe to all 5000 tags in a single call to SubscribeMultiple(). I still get the same error as above.
So my questions are:
I've looked at the following posts for some guidance:
Error after 100,001 tags are added to Data Client
Subscribing to a large number of tags, in parallel
Subscribing and reading large number of tags
Design Question / Rely on automatic subscriptions or subscribe manually?
However I'm still unclear what is the best approach for subscribing to a large number of tags.
I'm using:
- QuickOPC nuget package version 5.59.492
- Windows 10 version 1809 build 17763.1697
- our application is targeting .NET Core 3.1 running as a windows service.
In our test environment, we have around 100 assets (nodes) having 50 tags each. We need to subscribe to approximately 5000 tags in total with 1 second refresh rate, and we'd like the application to start up and subscribe to these tags as quickly as possible so we're currently trying to do it in parallel.
pseudocode
The code uses a single instance of EasyDAClient and it's not isolated.
What I'm observing is that the approach shown above takes many minutes to complete and causes numerous timeouts on the server. It's rare that I can successfully launch our application with just 50 asset nodes (~2500 tags). Most of the time the Browse() and Subscribe() connections timeout and throw exceptions. I've tried to increase the various browsing related EastDAClientTimeout values, but that just means it takes longer and in most cases it still times out. So I've tried to do it differently by doing the following:
pseudocode
The browsing is reasonably faster (presumably because there's less contention from Subscribe() calls), and the subscription is complete. But if we launch the app to subscribe to 50 asset nodes (~2500 tags) I begin to get errors from the subscription handler about the received message size in what appears to be the underlying WCF client:
"The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element. [...]"
The stacktrace for the above error is attached.
I've also tried to just do everything synchronously and just walk the server hierarchy by getting all the nodes and tags in one long operation (no parallelism), and then subscribe to all 5000 tags in a single call to SubscribeMultiple(). I still get the same error as above.
So my questions are:
- Is there any guidance on how many simultaneous operations an OPC XML DA server can be expected to handle?
- Is there a difference in terms of overhead between Browse() and Subscribe() calls? Is one more expensive or resource intensive than the other?
- Can you recommend a 'chunking' approach to setting up a subscription for 5000 tags?
- Is it better to execute a single Browse() call and "walk the tree" rather than execute multiple concurrent Browse() calls?
- Is there a recommended size to the number of tags used in a call to SubscribeMultiple() and are there parameters that I should be aware of such as ClientParameters, EngineParameters or any settings related to subscription size?