10:41, EEST
April 7, 2016
Hello,
we’re using the server inside an OSGI (Equinox) application, which requires applications (the UaServer is part of the “application”) to shut down in less than 15 seconds after the shutdown request has been received.
After server.shutdown(0, “”) and/or server.close(), the server says “UaServer closed”, but there seems to be active threads – because the OSGI framework program, which launches our application, tries to kill all remaining Threads (“Blocking-Work-Executors”). Is there any way to terminate all server threads after server.shutdown()?
Furthermore, these remaining threads seem also related to a memory leak: After restarting our application several times (after the framework tried to kill the remaining threads), we get a PermGenSpace error from the JVM.
11:18, EEST
April 3, 2012
Hi,
Those threads are from the Stack (not SDK) and are static, therefore it is a bit hard to create proper automatic shutdown for them. Please use StackUtils.shutdown() to do it manually.
Related possible memory leaks are fixed in stack version 1.03.340 https://github.com/OPCFoundation/UA-Java/milestone/1?closed=1. SDK future version 2.3 will use that (or later). When/if https://github.com/OPCFoundation/UA-Java/issues/40 is implemented (https://github.com/OPCFoundation/UA-Java/milestone/2) then we most likely move to automatically shutting down the threads in server shutdown.
– Bjarne
Most Users Ever Online: 1919
Currently Online:
37 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: 730
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
PromotionToold, HypromeImpupe, toneylapham544, rondawolinski7, Marypof5711, roycedelargie91, kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachusModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1