Archived
ObjectAdapter Thread Pools
Hi,
I'm currently encountering the following issue when developing a distributed system in Java:
I have an ICE-Server running and configered with an own ObjectAdapter-ThreadPool by
SimpleCommandInterfaceAdapter.ThreadPool.Size = 3
SimpleCommandInterfaceAdapter.ThreadPool.SizeMax = 15
The 'Client-Application' periodically invokes methods on the server every 5 minutes.
I'm observing now, that the ICE-Server obviously creates new threads, although size of Thread Pool should be sufficient.
e.g.
first server logs:
[INFO ] 2017-10-24 12:02:24.021 [SimpleCommandInterfaceAdapter.ThreadPool-0]
[INFO ] 2017-10-24 12:02:26.021 [SimpleCommandInterfaceAdapter.ThreadPool-1]
after a while Threadnumbers increase and lower numbers are not used anymore like:
[INFO ] 2017-10-24 12:10:24.021 [SimpleCommandInterfaceAdapter.ThreadPool-2]
[INFO ] 2017-10-24 12:10:26.021 [SimpleCommandInterfaceAdapter.ThreadPool-3]
after a while:
[INFO ] 2017-10-24 12:30:24.021 [SimpleCommandInterfaceAdapter.ThreadPool-8]
[INFO ] 2017-10-24 12:30:26.021 [SimpleCommandInterfaceAdapter.ThreadPool-9]
Has anyone an idea why this happens and how to solve this?
Any hints appreciated, thanks
Regards
Klaus
Comments
-
Hi Klaus,
This is the expected behavior. By default, the threads in an Ice thread pool will terminate during periods of inactivity until the pool reaches the minimum size of one thread. You can prevent idle threads from terminating by setting the
ThreadIdleTimeproperty but this usually isn't necessary.Regards,
Mark0
