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.

Subscribing to a large number of tags, in parallel

More
16 Oct 2020 12:28 #9007 by DC
In the scenario where there would only be one instance of my app running, subscribing to all 30K tags in one shot worked.

When there were multiple instances of my app running and subscribing at the same time, I had to subscribe in chunks.
The following user(s) said Thank You: tblong

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

More
16 Oct 2020 11:49 #9006 by tblong

DC wrote: That seems to work! Can you briefly explain what those settings are and why they resolved this issue?


@DC, If you don't mind sharing, when you were calling "SubscribeMultipleItems(tags)" were you sending the whole 30k list of tags in one shot or were you calling in smaller batches as recommended in this post ? Were there any other settings that you ended up having to tune, not already mentioned in this thread, to get this many tags subscribed reliably?

Thanks,
Tyler

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

More
10 Nov 2019 12:15 #7950 by support
Certain parts of QuickOPC work separately, and exchange the information through message queues. This way, low-level processing cannot disrupt higher levels, and vice versa. The message queues contain requests (for some work), and responses (results of the work done).

The queue capacities need to be long enough - there can be "spikes" of requests or responses which will eventually be consumed by the other party, but require storage temporarily. Obviously, the more items you work with, the higher is the maximum capacity needed.

The queue are allocated dynamically (no memory consumed upfront, if the queue size is set to high number). But when the limit is reached, no further elements are added to the queue - they are simply lost. We used to have event log reporting of this occurrence in past versions, but due to some technical difficulties currently there is nothing to indicate that the queue capacity was reached - except for the fact that requests or responses will be missing, which will manifest in various ways - one of them can be that not all items get subscribed.

Best regards

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

More
07 Nov 2019 13:41 #7938 by DC
That seems to work! Can you briefly explain what those settings are and why they resolved this issue?

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

More
07 Nov 2019 09:47 #7932 by support
Hello.

Can you please try to increase some settings (indicated below) to very high numbers, such as:
              EasyDAClient.ClientParameters.LinkCallbackQueueSize = 500000;
              EasyDAClient.ClientParameters.RequestQueueSize = 500000;
              EasyDAClient.ClientParameters.ResponseQueueSize = 500000;
              EasyDAClient.EngineParameters.TopicLruSize = 500000;
              EasyDAClient.EngineParameters.DefaultEventQueueSize = 500000;
These are all static parameters on the EasyDAClient class that need to be set once, before a first instance of it is created.

Best regards

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

More
06 Nov 2019 21:34 #7929 by DC
By "subscribe to less..." I mean that on the server, I can verify that I have 30000 tags. Some instances of the application subscribe to all 30000 tags, whereas other instances may only subscribe to 29844 or some other random number less than 30000.

I never receive notification for the missing ones, not even an error.

Yes, I have a way to check how many tags are on the server and how many tags are actually subscribed in the application.

Thank you

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

More
06 Nov 2019 20:52 #7928 by support
Hello,
you are really stretching it. These are huge numbers.

Can you clarify what you mean by "... subscribe to less"?
- Is it that you never receive any notification for them - not even a one with some error?
- Is it that you have a way to check the number of subscribed items on the server side, and you do not see the number expected?
- Or something else?

Thank you
Best regards

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

More
06 Nov 2019 13:29 #7922 by DC
Hi

I have a use case where an application needs to subscribe to 30K tags, and there may be several instances of that application running in parallel on the same machine.

The problem I am encountering is on initial subscription, some instances of the application successfully subscribe to all 30K tags, while other instances randomly subscribe to less.

The code I am using to subscribe is based on the docs:
client.ItemChanged += client_Main1_ItemChanged;
client.SubscribeMultipleItems(tags);

Thank you

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

Moderators: support
Time to create page: 0.066 seconds