Issue
-
The container views the total cores of the Host and gives an error that the CPU count has been surpassed when deploying Liferay on a containerized solution, having licensing for a specific amount of CPUs and configuring the deployments to limit the CPU usage.
Environment
- DXP 7.4
Resolution
-
There is a flag in the JVM Options so that you restrict the number of active cores the JVM will use since JDK 8 update 191:
https://bugs.openjdk.org/browse/JDK-8146115
You should add this in the JVM options at Liferay startup:
-XX:ActiveProcessorCount=8
This way, only 8 cores will be allocated by the JVM.
And this is what we take into account in our code to determine the number of cores with regards to the activation key constraints:
Contenido exclusivo para suscriptores.
Una Suscripción Enterprise de Liferay proporciona acceso a más de 1.500 artículos que incluyen las mejores practicas, diagnóstico de problemas y otras soluciones útiles. Inicia sesión para tener un acceso completo.
Inicia sesión