Wimmics/corese

Docker: Option sent to the java runtime of the corese server

MaillPierre opened this issue · 1 comments

Is your feature request related to a problem? Please describe.
I run several Corese servers as docker images for different uses. Some of those images are of higher priority than others, however, on several occasions, they have terminated prematurely due to an OutOfMemory error from the corese server inside corese. I would like to limit the memory usage of the least important instances.

Describe the solution you'd like
Proposed solutions:

  • General solution: a setting similar to the environment: OPTIONS: setting to send options directly to the java VM
  • Solution to my personal problem: A specific setting similar to the OPTIONS setting environment: OPTIONS: to specify a memory size in a java VM option-compliant format

Describe alternatives you've considered
In non-swarm mode, it is impossible to specify resources limit in docker-compose 3.8

Already solved for my use case.
Nevermind.

Changing the JVM heap size

To change the memory allocated to the JVM that runs Corese, provide the environment variable $JVM_XMX with the value of the -Xmx JVM parameter.

Example:

Add the option -e JVM_XMX=1024m to the docker run command.
Alternatively, add the following to the docker-compose.yml file:
environment:
  JVM_XMX: "1024m"