Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kaladay opened this issue Nov 16, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@kaladay
Copy link

kaladay commented Nov 16, 2023

[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. FROM folioci/alpine-jre-openjdk17:latest
  2. CMD java -jar -Xmx4096m ./mod-camunda.jar

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:

   "exec": "java -Dport=%p -jar ../${artifactId}/target/${project.artifactId}-${project.version}.jar -Dspring.config.location=classpath:/ -Dhttp.port=%p --server.port=%p -Dpolyglot.engine.WarnInterpreterOnly=false"

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
@kaladay kaladay added this to FOLIO Nov 15, 2023
@kaladay kaladay converted this from a draft issue Nov 16, 2023
@kaladay kaladay moved this from 📋 Backlog to 🏃 On Sprint in FOLIO Nov 16, 2023
@kaladay kaladay added the enhancement New feature or request label Nov 16, 2023
@jeremythuff jeremythuff moved this from 🏃 On Sprint to 👷 In Planning in FOLIO Nov 30, 2023
@jeremythuff jeremythuff moved this from 👷 In Planning to 📋 Backlog in FOLIO Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant