- Newest
- Most votes
- Most comments
It seems impossibile to run a different garbage collector with Corretto 11 runtime.
Per docs, It is only mentioned to work with Corretto 17 runtime.
Anyway, the instruction are the following:
docker run -p 9000:8080 --env JAVA_TOOL_OPTIONS='-XX:+UnlockExperimentalVMOptions -XX:+PrintCommandLineFlags -XX:+UseEpsilonGC -Xlog:gc' echo-lambda:0.1.0
Gianluca
Hi, "Multiple garbage collectors selected " would say that you run another GC by default (G1GC ?). So, i'd try to deactivate this other GC by adding -XX:-UseG1GC (or equivalent if default GC is another one) to your -XX:+UseEpsilonGC in JAVA_TOOL_OPTIONS.
Best,
Didier
I have seen your answer: did you check that G1GC is the only other GC running in your context? You config may use another one by default.
2nd update: based on your answer below, can you switch your Lambda runtime to Java 17? It is supported for a few months: https://aws.amazon.com/about-aws/whats-new/2023/04/aws-lambda-java-17/
It still gives me error:
docker run -p 9000:8080 --env JAVA_TOOL_OPTIONS='-XX:-UseG1GC -XX:+UnlockExperimentalVMOptions -XX:+PrintCommandLineFlags -XX:+UseEpsilonGC -Xlog:gc' echo-lambda:0.1.0
20 Jul 2023 08:33:38,305 [INFO] (rapid) exec '/var/runtime/bootstrap' (cwd=/var/task, handler=)
START RequestId: 4558a7d8-8f8d-43ce-a3e2-a95a01d029d4 Version: $LATEST
20 Jul 2023 08:33:41,981 [INFO] (rapid) extensionsDisabledByLayer(/opt/disable-extensions-jwigqn8j) -> stat /opt/disable-extensions-jwigqn8j: no such file or directory
20 Jul 2023 08:33:41,981 [INFO] (rapid) Configuring and starting Operator Domain
20 Jul 2023 08:33:41,981 [INFO] (rapid) Starting runtime domain
20 Jul 2023 08:33:41,981 [WARNING] (rapid) Cannot list external agents error=open /opt/extensions: no such file or directory
20 Jul 2023 08:33:41,981 [INFO] (rapid) Starting runtime without AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN , Expected?: false
Picked up JAVA_TOOL_OPTIONS: -XX:-UseG1GC -XX:+UnlockExperimentalVMOptions -XX:+PrintCommandLineFlags -XX:+UseEpsilonGC -Xlog:gc
Error occurred during initialization of VM
Multiple garbage collectors selected
20 Jul 2023 08:33:41,988 [WARNING] (rapid) First fatal error stored in appctx: Runtime.ExitError
20 Jul 2023 08:33:41,988 [WARNING] (rapid) Process runtime-1 exited: exit status 1
20 Jul 2023 08:33:41,988 [ERROR] (rapid) Init failed error=Runtime exited with error: exit status 1 InvokeID=
20 Jul 2023 08:33:41,989 [INFO] (rapid) Starting runtime domain
20 Jul 2023 08:33:41,989 [WARNING] (rapid) Cannot list external agents error=open /opt/extensions: no such file or directory
END RequestId: 5e68d810-56a0-4d67-84f3-3aa39c36b025
REPORT RequestId: 5e68d810-56a0-4d67-84f3-3aa39c36b025 Init Duration: 0.31 ms Duration: 7.76 ms Billed Duration: 8 ms Memory Size: 3008 MB Max Memory Used: 3008 MB
Relevant content
- Accepted Answerasked 9 months ago
- asked 10 months ago
- asked a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago
see my 2nd update