We are seeing issues when running Keycloak (11.0.3) in Kubernetes (AKS), that the activeProcessorCount by default is always 1, meaning (if I understand correctly) that thread pools etc. will be sized incorrectly. We are running Keycloak and have seen errors like the one below, which has resulted in the containers restarting with (receiving a TERM signal from OS):
14:51:37,057 FATAL [org.jgroups.protocols.TCP] (Connection.Receiver [10.71.0.11:7600 - 10.71.0.104:43563]-9,ejb,keycloak-0) keycloak-0: thread pool is full (max=100, active=200); thread dump (dumped once, until thread_dump is reset)
I have been looking at this post:
And we have made the simple Java class test as is done in that post. activeProcessorCount is always 1 if not set explicitly.
Is there a need for setting the activeProcessorCount explicitly? And if yes, why? Shouldn’t the Helm deployment set this if required? Or shouldn’t I expect that Java discovers the correct number of CPU’s?
Any feedback is highly appreciated.