- Posts: 24
- Thank you received: 1
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.
Memory leak in QuickOPC nuget
- janko.mihelic@adnet.hr
- Topic Author
- Offline
- Elite Member
NotifyCollectionChangedEventHandler
OpcLabs.BaseLib.OperationModel.ValueResult
OpcLabs.EasyOpc.UA.AddressSpace.UANodeId
Please Log in or Create an account to join the conversation.
- janko.mihelic@adnet.hr
- Topic Author
- Offline
- Elite Member
- Posts: 24
- Thank you received: 1
- Siemens PLC
- One event every 10ms , one data change every 10ms
- Only data changes every 100ms
- Only events every 100ms
- Only events every 500ms
- Only events every 2000ms
- Microsoft docker OPC UA server, can't remember its event frequency but it was somewhere around 500ms per event
- Prosys OPC UA server with something like one event every 20 seconds
In all those conditions we observed the same problem, memory consumption keeps growing but not in the same rate. We can't guarantee that only subscribing to data changes will keep the memory consumption high we only tested it for an hour. But we can for sure say that subscribing to events the memory just keeps rising no matter the number of events per second. More events per seconds means faster memory rise.
Please Log in or Create an account to join the conversation.
But, the Prosys simulation server is not generating that. In fact, it's generating very very few events.
So are you saying that the rate of incoming events/data is irrelevant to what you observe with regard to memory consumption? That the memory leak would manifets itself with almost no events coming in? (And no value changes either, because your source only subscribes to events).
Please explain.
Please Log in or Create an account to join the conversation.
- janko.mihelic@adnet.hr
- Topic Author
- Offline
- Elite Member
- Posts: 24
- Thank you received: 1
UAEndpointDescriptor endpointDescriptor = new UAEndpointDescriptor( "opc.tcp://localhost:50000" );
UAEndpointDescriptor endpointDescriptor = new UAEndpointDescriptor( "opc.tcp://localhost:53530/OPCUA/SimulationServer" );
you may need to change localhost with pc name where server is running if it is not on same pc.
Here is also link to console app ready to connect to Prosys ( might also need endpoint correction with correct pc name)
github.com/lermix/OpcLabBug
Please Log in or Create an account to join the conversation.
Can you provide the app source code that will work with Prosys OPC UA simulation server , so that I do not have to use Docker?
Regards
Please Log in or Create an account to join the conversation.
- janko.mihelic@adnet.hr
- Topic Author
- Offline
- Elite Member
- Posts: 24
- Thank you received: 1
We are posting it here once again for easier access
Docker command: docker run --rm -it -p 50000:50000 -p 8080:8080 --name opcplc mcr.microsoft.com/iotedge/opc-plc:latest --pn=50000 --autoaccept --sph --sn=5 --sr=10 --st=uint --fn=5 --fr=1 --ft=uint --ctb --scn --lid --lsn --ref --gn=5 --alm --ses --er=100
github repo: github.com/lermix/OpcBugServiceApp
(github.com/lermix/OpcBugServiceApp/blob/master/OpcLabsBugWindowService/Client.cs -> place where OpcUa client is instantiated )
This is a windows service if it presents problem for you, you can crate new console app with the same code.
We also used Prosys OPC UA simulation server and Siemens CPU 1512SP-1 PN relay as OPC server. The behavior was identical.
Please tell us if there is anything more we can do to help you reproduce the problem or help track its source
Please Log in or Create an account to join the conversation.
In order to include attachments, they need to be selected with "Add", but then also "Insert"-ed into the post, otherwise they won't be used.
Yes, this is the kind of chart that shows the suspected memory leak behavior. I find it interesting that you have also monitored what seems to be the server application, and that it shows the same growth. This may indicate that a problem in the server causes the client to increase the memory consumption, or also vice versa - that the problem in the client causes the server to increase its memory consumption.
So, let's get back how we can reproduce the problem on our side. I know you have previously provided some Docker container. For my troubleshooting, I need a setup where I have the source code (project) of the application that uses QuickOPC, and can debug it and tweak it etc., directly on the developers machine. The server can be on the same machine, on remote machine, or running in a container.
Can you deliver the parts needed for this kind of setup (or are they already in what you have provided before? )
Regards
Please Log in or Create an account to join the conversation.
- janko.mihelic@adnet.hr
- Topic Author
- Offline
- Elite Member
- Posts: 24
- Thank you received: 1
Please Log in or Create an account to join the conversation.
- janko.mihelic@adnet.hr
- Topic Author
- Offline
- Elite Member
- Posts: 24
- Thank you received: 1
Here is a 10 days of data, green line is simple test console application which is only subscribed to events, and the red line is our main application, we are sending report with image. We are connected to Prosys OPC UA simulation server receiving one event approximately every 20 seconds and are using OpcLabs.QuickOpc verison 5.63.246 on console app and version 5.63.221 on our main app
Attachments:
Please Log in or Create an account to join the conversation.
I do not understand why are you sampling the memory consumption so quickly, and then sending over charts that only have horizontal lines in them. That is close to useless.
You need to set the PerfMon sampling period so that the whole period (say 36-48 hours) fits on the chart.
Regards.
Please Log in or Create an account to join the conversation.