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.

Memory leak in QuickOPC nuget

More
09 Dec 2022 07:20 #11319 by janko.mihelic@adnet.hr
We have not tested only subscribing with no events, stopping events stops memory rise, at least it looks like that, but as we said more events, faster the problem can be observed. We believe only subscription is not a problem because we can see rise of 3 types of objects:
NotifyCollectionChangedEventHandler
OpcLabs.BaseLib.OperationModel.ValueResult
OpcLabs.EasyOpc.UA.AddressSpace.UANodeId

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

More
09 Dec 2022 07:16 #11318 by janko.mihelic@adnet.hr
We tested this in multiple conditions:
  1. Siemens PLC
    1. One event every 10ms , one data change every 10ms
    2. Only data changes every 100ms
    3. Only events every 100ms
    4. Only events every 500ms
    5. Only events every 2000ms
  2. Microsoft docker OPC UA server, can't remember its event frequency but it was somewhere around 500ms per event
  3. 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.

More
06 Dec 2022 14:45 #11307 by support
I do not understand one thing. In your original reported, you wrote "We are receiving a value change approximately every 14 ms and an event every 10 ms".
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.

More
06 Dec 2022 06:51 #11304 by janko.mihelic@adnet.hr
Just change the endpoint, in github repo Client.cs file replace:
UAEndpointDescriptor endpointDescriptor = new UAEndpointDescriptor( "opc.tcp://localhost:50000" );
with:
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.

More
05 Dec 2022 12:14 #11293 by support
Thank you.

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.

More
05 Dec 2022 11:17 #11291 by janko.mihelic@adnet.hr
The server you are seeing in report is not OpcUa server it is our server that collects data from multiple sources with multiple protocols and it has OpcUa client, it is the application in which problematic behavior was first noticed. You can reproduce the behavior with docker OpcUa server mentioned before and github repo with a client.
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.

More
05 Dec 2022 09:56 - 05 Dec 2022 09:56 #11288 by support
Thank you.
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
Last edit: 05 Dec 2022 09:56 by support.

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

More
05 Dec 2022 07:05 #11281 by janko.mihelic@adnet.hr
For some reason there are not attachments in previous reply so I am attaching once again
Attachments:

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

More
05 Dec 2022 07:04 #11280 by janko.mihelic@adnet.hr
Hello,

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.

More
23 Nov 2022 13:49 - 23 Nov 2022 13:55 #11233 by support
Hello.

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.
Last edit: 23 Nov 2022 13:55 by support.

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

Moderators: support
Time to create page: 0.070 seconds