11:08, EEST
April 22, 2016
Hello,
My Server Program based on Prosys Java SDK has memory leak problem.
I analyzed my snapshot using Eclipse Memory Analyzer.
The Leak Suspects Report of it shows one “Problem Suspect 1” as following:
=====================================================================
1,897,833 instances of “com.prosysopc.ua.server.nodes.CacheProperty”,
loaded by “com.lsis.smartlv.maintsw.thirdparty” occupy 1,389,888,312 (67.79%) bytes.
Keywords
com.prosysopc.ua.server.nodes.CacheProperty
com.lsis.smartlv.maintsw.thirdparty
=====================================================================
Even though I shutdown by calling “UaServer.shutdown(5, new LocalizedText(“Closed by user”, Locale.ENGLISH))” and manual gabage collector, I can’t clear instances of CacheProperty.
Please tell me how to clear instances of “com.prosysopc.ua.server.nodes.CacheProperty”.
12:55, EEST
April 3, 2012
Hi,
Hmm thats quite many of them.. which version of the Java SDK you are using?
After the 5 seconds have passed (the first argument), do you still hold reference to the UaServer object in any way? If yes then that could be the cause. The NodeManagers are not destroyed when the server is shut down, as it can be restarted. However if you no longer hold the reference to the UaServer object at all, then they all should be garbage collected (unless you e.g. refer a manager directly).
If you want to clear all resources (which are normally done automatically when JVM shuts down), you will need to also call the static StackUtils.shutdown() method to shut down the common threadpool the lower level implementations use.
P.S. you should be able to use “Paths to GC root” feature to show which part is holding the instance from being garbage collected, https://www.eclipse.org/mat/about/dominator_tree.png
Most Users Ever Online: 1919
Currently Online:
15 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 736
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1524
Posts: 6450
Newest Members:
kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, ThomassnismModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1