Avatar
Please consider registering
guest
sp_LogInOut Log Insp_Registration Register
Register | Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSSsp_TopicIcon
Threads still active after shutdown
July 19, 2016
10:41, EEST
Avatar
mmaus
Member
Members
Forum Posts: 4
Member Since:
April 7, 2016
sp_UserOfflineSmall Offline

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.

July 19, 2016
11:18, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1068
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

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/OPCFoundati…..1?closed=1. SDK future version 2.3 will use that (or later). When/if https://github.com/OPCFoundati…../issues/40 is implemented (https://github.com/OPCFoundati…..ilestone/2) then we most likely move to automatically shutting down the threads in server shutdown.

– Bjarne

July 19, 2016
11:48, EEST
Avatar
mmaus
Member
Members
Forum Posts: 4
Member Since:
April 7, 2016
sp_UserOfflineSmall Offline

Thank you very much,

your hint with StackUtis.shutdown() solved the issue with rebooting!
I’ll be looking forward for 2.3 for the memory leak issues.

-Moritz

Forum Timezone: Europe/Helsinki
Most Users Ever Online: 1919
Currently Online:
Guest(s) 63
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 100
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 773
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1558
Posts: 6567
Newest Members:
aracelyhaley4, raphaelschonell, Ashmag, kathyreimann56, brittanylemos, dorthycundiff76, PromotionToold, CHHinrichs, rodricklienhop, jose_Wanderlei
Moderators: Jouni Aro: 1039, Pyry: 1, Petri: 1, Bjarne Boström: 1054, Jimmy Ni: 26, Matti Siponen: 359, Lusetti: 0
Administrators: admin: 1