NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

OPC UA memory leak

cRIO-9056, LVRT 2018, OPC UA Server with ~50 tags.  My application requires dynamic reconfiguration of OPC tags so the OPC UA server needs to be closed and reopened periodically.  I am finding that I incur an increasing memory loss each time the OPC UA server is cycled.  I have meticulously closed all OPC UA folders and references prior to stopping the server but it does not make any difference.   Any thoughts would be appreciated, thanks.

0 Kudos
Message 1 of 8
(3,490 Views)

I’m sorry to hear that. Do you think you could estimate how many bytes is lost per open/close cycle?

0 Kudos
Message 2 of 8
(3,482 Views)

Also, how are you evaluating memory usage?

0 Kudos
Message 3 of 8
(3,441 Views)

In addition to the question already asked, how are you measuring the memory usage? The property nodes from the NI System Configuration API currently don't work properly on Linux Real-Time so just double-checking that you're looking at accurate numbers. 

 

Memory Reporting Issue with NI Linux Real Time OS Target

 

EDIT: Drat, rtollert beat me to it. 

Charlie J.
National Instruments
0 Kudos
Message 4 of 8
(3,439 Views)

Yes I read the articles on cRIO Linux memory usage and have changed my monitor code to use the recommended Linux shell command.  In spite of this I am seeing a 3-4% memory loss every time I close and reopen the OPC UA server.

0 Kudos
Message 5 of 8
(3,388 Views)

I meant .3-.4%.  Here is the test case I am using...

0 Kudos
Message 6 of 8
(3,369 Views)

Since it looks like you've narrowed it down, I'd recommend opening a support ticket so that it can be brought to the attention of the OPC UA team. I'm admittedly not clear on proper usage of the OPC UA API.

 

Out of curiosity, what's the use case for regularly opening and closing servers as opposed to leaving one running?

Charlie J.
National Instruments
0 Kudos
Message 7 of 8
(3,356 Views)

I tried just stopping the service (which is required to modify folders and tags) and closing all the refnums but still had the memory leak so I thought maybe closing the server would help but it does not.  BYW I have created a ticket for this issue but thought in the meantime someone from this specific forum might have seen this before.

0 Kudos
Message 8 of 8
(3,351 Views)