Skip to content

How to configure Metals to prevent OutOfMemoryError? #6785

Answered by tgodzik
adamw asked this question in Q&A
Discussion options

You must be logged in to vote

You can use serverProperties:

  "metals.serverProperties": [
    "-Xmx2G",
    "-Dmetals.loglevel=debug",
    "-Dmetals.statistics=all",
    "-Dmetals.enable-best-effort=true",
    "-XX:+UseZGC",
    "-XX:ZUncommitDelay=30",
    "-XX:ZCollectionInterval=5"
  ],

the above is my setting. With UseZGCand JDK 17 you might even skip -Xmx. The default is only 1g.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@adamw
Comment options

@tgodzik
Comment options

@adamw
Comment options

Answer selected by adamw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants