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.

Process Memory increasing after creating EasyUAClient instance

More
27 Jul 2021 11:00 #10057 by support
It is possible that there will be no fix at all. It all depends on the library vendor, we have no control over it.

If the vendor provides a fixed version by the time of QuickOPC 2021.3 release, we will include it. Older versions will not get updated.

Best regards

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

More
27 Jul 2021 10:58 #10056 by zaglerp
I changed the config as described and can confirm that the sample application now works as expected.

Can you give me an estimation, how long it will take you to provide a fix for this issue?
Which releases will be covered by a fix?

Best Regards
Peter

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

More
26 Jul 2021 06:48 #10050 by zaglerp
Thank you,

I will try the settings you have suggested.

Kind regards
Peter

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

More
25 Jul 2021 09:20 #10042 by support
Hello.
I have determined that the problem is caused by a 3rd party library (BoxedApp SDK) that we use inside QuickOPC.

You can turn it off like this: kb.opclabs.com/How_to_disable_prerequisites_boxing , and the memory leak goes away.
The downside is that, if the QuickOPC client app will need to create its own instance certificate (usually on the first run), the OPC UA certificate generator utility (Opc.Ua.CertificateGenerator.exe) will have to be present on one of its search paths (can be directly next to your executable).

We will report the problem to the library vendor.

Best regards

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

More
19 Jul 2021 18:29 #10016 by support
Understood. Thank you.

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

More
19 Jul 2021 13:20 #10015 by zaglerp
Hello,

I have enclosed a chart from performance monitor running the test application for 7 days.
The original application reached 1460MB and was stopped by Windows.

The memory never returned to a "normal" amount.

Kind regards
Peter
Attachments:

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

More
19 Jul 2021 13:02 #10014 by support
Hello.
I was able to reproduce the issue on Windows Server 2016. I am running various tests now to get some picture of what influences it. It will take time.

Question:

You reported that the application eventually ran out of memory. Was that with the "minimized" project - precisely the one you have sent me - or with some other application where the problem was originally detected?

The reason I am asking is that I have a documented case where the user has seen a constant memory growth for 72 hours (3 days). And we starting looking at it. But, when we ran a longer test, the GC has eventually decided to deallocate the memory on 4th day. So in the end there was no memory leak. If the "out of memory" condition was observed with the original application only, I will have to repeat that test with the minimized project, to see if it also behaves that way (i.e. not only seems to consume more and more memory for cca 12 hours as I did, but over even longer time). But if you have already proved that with the minimized project, I will rely on your test.

Regards

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

More
15 Jul 2021 13:13 #9996 by zaglerp
Hello,

this issue appeared after upgrading from 5.52 to 5.58.

If I switch back to release 5.52 the sample works as expected, without increasing the memory.
This issue is definitely related to the update of QuickOPC and stops us from running QuickOPC based applications.
Of cource, if necessary we will update to the latest release, but obviously the issue still exists.

Kind regards
Peter

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

More
15 Jul 2021 10:28 #9993 by zaglerp
Hello,

thank you for your answer.
I added MTAThread explicitly to Main() but without success. Memory is still increasing.

Kind regards
Peter

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

More
13 Jul 2021 12:28 #9978 by support
Hello.

I suspect the problem may have to do with the garbage collector not being able to run under some circumstances (in a STA when no message pumping is done - becasue message pumping is a *must* in an STA). See e.g. social.msdn.microsoft.com/Forums/vstudio/en-US/835db88e-db51...-stathread-specified?forum=clr .

Try to pump messages inside your loop, OR make sure the main thread is an MTA thread (add [MTAThread] to Main(), or otherwise).

More info:
- EasyXXClient does not explicitly set the apartment state, to my knowledge, but EasyXXClient objects are exposed as COM objects using .NET interop, so the .NET might be doing something there on its own.
- Re periodic processing: There should be no such processing in the simple code you provided (when the EasyXXClient is just created and nothing else).
- GC is not called explicitly from our own code.
- There is no periodic allocation of memory when no OPC communication is ongoing.

Best regards

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

Moderators: support
Time to create page: 0.063 seconds