-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OPC Publisher cyclic read best practices / out of memory issues #2160
Comments
This appears to come from the server. What server is used? To double check that it is not related to a reconnect issue in 2.9.2, could you try using 2.9.4-preview3 tag of OPC publisher container? |
Kepware KEPServerEX 6.15 is used, latest version. I did deploy v2.9.4-preview3 of the OPC publisher (2.9.4.4-preview+52859473eb (.NET 8.0.1/linux-x64/OPC Stack 1.4.372.116)), and I'm not running out of memory anymore. But I notice that not 1000 values are beint sent every 5 seconds (see publishednodes file above), but approx 376. It seems that the amount of nodes that are used for cyclic reading is somehow capped at this amount? OPC Publisher settings: DIAGNOSTICS INFORMATION for : <> DIAGNOSTICS INFORMATION for : <> How can it be that I only seem to be receiving approx 380 datapoints every 5 seconds, while I expect 1000? *Edit: did some additional testing and registered the findings in #2165. |
@b-enigma-con, I have published 2.9.4-preview4 tag to MCR for testing. Please let me know if this fixes the issues you are seeing. |
We are experiencing memory issues in the way we apply the cyclic read of the OPC Publisher. We are running version 2.9.2 on an IoT Edge module with 16GB RAM, 4 vCPU's. The (dedicated) OPC Server has 16GB of RAM as well. Both VM's are not even close to using 100% RAM. We are doing cyclic reads only for 1000 nodes, every 5 seconds. Our publishednodes.json looks like this (with 1000 nodes):
[
{
"EndpointUrl": "opc.tcp://xxxx",
"UseSecurity": true,
"OpcNodes": [
{
"Id": "NODE ID 1",
"UseCyclicRead": true,
"OpcSamplingInterval": 5000
},
{
"Id": "NODE ID 2",
"UseCyclicRead": true,
"OpcSamplingInterval": 5000
},
{
"Id": "NODE ID 3",
"UseCyclicRead": true,
"OpcSamplingInterval": 5000
},
....................
}
After a while, we're seeing the following logs from our iot edge module:
[14:02:18.0101] fail: Azure.IIoT.OpcUa.Publisher.Stack.Services.OpcUaStack[0]
Publish #122, Reconnecting=False, Error: BadOutOfMemory
[14:02:18.0103] fail: Azure.IIoT.OpcUa.Publisher.Stack.Services.OpcUaStack[0]
Publish #121, Reconnecting=False, Error: BadOutOfMemory
[14:02:18.1131] fail: Azure.IIoT.OpcUa.Publisher.Stack.Services.OpcUaStack[0]
PUBLISH #121 - Unhandled error BadOutOfMemory during Publish.
Opc.Ua.ServiceResultException: BadOutOfMemory
at Opc.Ua.ClientBase.ValidateResponse(ResponseHeader header)
at Opc.Ua.SessionClient.EndPublish(IAsyncResult result, UInt32& subscriptionId, UInt32Collection& availableSequenceNumbers, Boolean& moreNotifications, NotificationMessage& notificationMessage, StatusCodeCollection& results, DiagnosticInfoCollection& diagnosticInfos)
at Opc.Ua.Client.Session.OnPublishComplete(IAsyncResult result)
[14:02:18.1134] fail: Azure.IIoT.OpcUa.Publisher.Stack.Services.OpcUaStack[0]
PUBLISH #122 - Unhandled error BadOutOfMemory during Publish.
Opc.Ua.ServiceResultException: BadOutOfMemory
at Opc.Ua.ClientBase.ValidateResponse(ResponseHeader header)
at Opc.Ua.SessionClient.EndPublish(IAsyncResult result, UInt32& subscriptionId, UInt32Collection& availableSequenceNumbers, Boolean& moreNotifications, NotificationMessage& notificationMessage, StatusCodeCollection& results, DiagnosticInfoCollection& diagnosticInfos)
at Opc.Ua.Client.Session.OnPublishComplete(IAsyncResult result)
[14:02:29.8912] fail: Azure.IIoT.OpcUa.Publisher.Stack.Services.OpcUaStack[0]
Publish #125, Reconnecting=False, Error: BadOutOfMemory
[14:02:29.8915] fail: Azure.IIoT.OpcUa.Publisher.Stack.Services.OpcUaStack[0]
Publish #126, Reconnecting=False, Error: BadOutOfMemory
[14:02:29.9914] fail: Azure.IIoT.OpcUa.Publisher.Stack.Services.OpcUaStack[0]
PUBLISH #125 - Unhandled error BadOutOfMemory during Publish.
Opc.Ua.ServiceResultException: BadOutOfMemory
at Opc.Ua.ClientBase.ValidateResponse(ResponseHeader header)
at Opc.Ua.SessionClient.EndPublish(IAsyncResult result, UInt32& subscriptionId, UInt32Collection& availableSequenceNumbers, Boolean& moreNotifications, NotificationMessage& notificationMessage, StatusCodeCollection& results, DiagnosticInfoCollection& diagnosticInfos)
at Opc.Ua.Client.Session.OnPublishComplete(IAsyncResult result)
[14:02:29.9917] fail: Azure.IIoT.OpcUa.Publisher.Stack.Services.OpcUaStack[0]
PUBLISH #126 - Unhandled error BadOutOfMemory during Publish.
Opc.Ua.ServiceResultException: BadOutOfMemory
at Opc.Ua.ClientBase.ValidateResponse(ResponseHeader header)
at Opc.Ua.SessionClient.EndPublish(IAsyncResult result, UInt32& subscriptionId, UInt32Collection& availableSequenceNumbers, Boolean& moreNotifications, NotificationMessage& notificationMessage, StatusCodeCollection& results, DiagnosticInfoCollection& diagnosticInfos)
at Opc.Ua.Client.Session.OnPublishComplete(IAsyncResult result)
[14:02:29.9925] fail: Azure.IIoT.OpcUa.Publisher.Stack.Services.OpcUaStack[0]
Publish #127, Reconnecting=False, Error: BadOutOfMemory
[14:02:29.9935] fail: Azure.IIoT.OpcUa.Publisher.Stack.Services.OpcUaStack[0]
Publish #128, Reconnecting=False, Error: BadOutOfMemory
[14:02:30.1665] fail: Azure.IIoT.OpcUa.Publisher.Stack.Services.OpcUaStack[0]
PUBLISH #127 - Unhandled error BadOutOfMemory during Publish.
Opc.Ua.ServiceResultException: BadOutOfMemory
at Opc.Ua.ClientBase.ValidateResponse(ResponseHeader header)
at Opc.Ua.SessionClient.EndPublish(IAsyncResult result, UInt32& subscriptionId, UInt32Collection& availableSequenceNumbers, Boolean& moreNotifications, NotificationMessage& notificationMessage, StatusCodeCollection& results, DiagnosticInfoCollection& diagnosticInfos)
at Opc.Ua.Client.Session.OnPublishComplete(IAsyncResult result)
[14:02:30.1697] fail: Azure.IIoT.OpcUa.Publisher.Stack.Services.OpcUaStack[0]
PUBLISH #128 - Unhandled error BadOutOfMemory during Publish.
Opc.Ua.ServiceResultException: BadOutOfMemory
at Opc.Ua.ClientBase.ValidateResponse(ResponseHeader header)
at Opc.Ua.SessionClient.EndPublish(IAsyncResult result, UInt32& subscriptionId, UInt32Collection& availableSequenceNumbers, Boolean& moreNotifications, NotificationMessage& notificationMessage, StatusCodeCollection& results, DiagnosticInfoCollection& diagnosticInfos)
at Opc.Ua.Client.Session.OnPublishComplete(IAsyncResult result)
Another strange thing is that when I configure 1000 nodes with only cyclic reading, the log says:
Monitored Opc nodes succeeded count: 7 <- I expect this to say 1000?
Monitored Opc nodes failed count : 0
The text was updated successfully, but these errors were encountered: