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
ThreadIdleTime
property but this usually isn't necessary.Regards,
Mark0 -
Hi Mark,
thanks for your answer.
Is it possible, that the Ice.ACM.Client.Timeout - property is also somehow related to the idletime of the threadpool?
Regards
Klaus0 -
Hi,
No, that setting is not related to thread pools. If you're still having trouble, please provide more details and we might be able to help.
Regards,
Mark0