ConditionRefresh method and large number of alarms|OPC UA Implementation: Stacks, Tools, and Samples|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
ConditionRefresh method and large number of alarms
Avatar
Peter Franklin
Member
Members
Forum Posts: 24
Member Since:
04/14/2020
sp_UserOfflineSmall Offline
1
06/09/2021 - 14:55
sp_Permalink sp_Print

We are testing alarms and are scaling up the system to a large number of alarms. With numbers > 1000 or so, we are seeing that when we have the client issue the ConditionRefresh method, we are only getting 900 alarms back from the server, i.e., the client's Notification event on the MonitoredItem is only getting called 900 times, even though it should be > 1000.

We are using the .NET Standard server and client libraries.

Any ideas as to what we might look for?

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
06/09/2021 - 20:30
sp_Permalink sp_Print

Are you sure the Servers queues are not overflowing?

All servers have finite queues to prevent resource exhaustion.

Once you confirm all notifications are sent then you will need to investigate a .NET threading issue.

I suggest you process the notification messages manually (there is a different callback on the subscription object) instead of relying on the monitored item callback. You could quickly dump all the messages into a queue and process them on another thread.

Avatar
Peter Franklin
Member
Members
Forum Posts: 24
Member Since:
04/14/2020
sp_UserOfflineSmall Offline
3
06/10/2021 - 09:08
sp_Permalink sp_Print sp_EditHistory

Randy Armstrong said
Are you sure the Servers queues are not overflowing?

All servers have finite queues to prevent resource exhaustion.

Once you confirm all notifications are sent then you will need to investigate a .NET threading issue.

I suggest you process the notification messages manually (there is a different callback on the subscription object) instead of relying on the monitored item callback. You could quickly dump all the messages into a queue and process them on another thread.

  

Okay, I did confirm that we are hitting the maximum queue size and dropping some of the notification messages. We are hitting this code path:

// have to drop unsent messages if out of queue space.
int overflowCount = messages.Count - (int)m_maxMessageCount;
if (overflowCount > 0)
{

...

}

 

So the way to handle this is to configure larger limits using these configuration properties I assume?

public int MaxMessageQueueSize
public int MaxNotificationQueueSize
public int MaxNotificationsPerPublish

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
4
06/11/2021 - 13:27
sp_Permalink sp_Print

MaxMessageQueueSize should do the trick.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 45
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1435
Posts: 4855