Professional OPC
Development Tools

logos

Subscribing to a large number of tags, in parallel

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.269 seconds

      

 Recommend this on Google