TAMULib / mod-camunda

Apache License 2.0
0 stars 0 forks source link

Suppress polyglot warning, adding '-Dpolyglot.engine.WarnInterpreterOnly=false'. #233

Open kaladay opened 9 months ago

kaladay commented 9 months ago
[To redirect Truffle log output to a file use one of the following options:
* '--log.file=<path>' if the option is passed using a guest language launcher.
* '-Dpolyglot.log.file=<path>' if the option is passed using the host Java launcher.
* Configure logging using the polyglot embedding API.]
[engine] WARNING: The polyglot context is using an implementation that does not support runtime compilation.
The guest application code will therefore be executed in interpreted mode only.
Execution only in interpreted mode will strongly impact the guest application performance.
For more information on using GraalVM see https://www.graalvm.org/java/quickstart/.
To disable this warning the '--engine.WarnInterpreterOnly=false' option or use the '-Dpolyglot.engine.WarnInterpreterOnly=false' system property.
[engine] WARNING: The polyglot context is using an implementation that does not support runtime compilation.
The guest application code will therefore be executed in interpreted mode only.
Execution only in interpreted mode will strongly impact the guest application performance.
For more information on using GraalVM see https://www.graalvm.org/java/quickstart/.
To disable this warning the '--engine.WarnInterpreterOnly=false' option or use the '-Dpolyglot.engine.WarnInterpreterOnly=false' system property.

The -Dpolyglot.engine.WarnInterpreterOnly=false can be added to the Dockerfiles and README documentation.

These dockerfiles should be updated:

  1. https://github.com/TAMULib/mod-camunda/blob/bc5ccc8dcdda349d55f89233f3549dd25c627112/Dockerfile#L1
  2. https://github.com/TAMULib/mod-camunda/blob/bc5ccc8dcdda349d55f89233f3549dd25c627112/docker/build_and_run/Dockerfile#L43

The first link above above will be more complicated in that research is needed to see if this can be passed through environment variables. The FOLIO environment exposes the environment variable JAVA_OPTIONS. This is probably want needs to be done, for example, the Java options is described here:

So, the environment variable may need to be set as follows (perhaps in Rancher and then documented in the code?):

# Set the location of the verticles.
ENV VERTICLE_HOME /usr/verticles

# Pass custom java options.
ENV JAVA_OPTIONS -XX:MaxRAMPercentage=66.0 -Dpolyglot.engine.WarnInterpreterOnly=false

An alternative might be to update the Deployment Descriptor:

The second link above should be as simple as adding the parameter to the exec command like this:

CMD java -jar -Xmx4096m ./mod-camunda.jar -Dpolyglot.engine.WarnInterpreterOnly=false