Skip to content

Frequent java.lang.OutOfMemoryError: Metaspace #26

@arichiardi

Description

@arichiardi

When using boot watch test I have a very frequent error:

clojure.lang.Compiler$CompilerException: java.lang.OutOfMemoryError: Metaspace, compiling:(ragtime/protocols.clj:3:1)
             java.lang.OutOfMemoryError: Metaspace
                                ...                
               clojure.core/load/fn  core.clj: 5893
     clojure.core/load/invokeStatic  core.clj: 5892
                  clojure.core/load  core.clj: 5876
                                ...                
 clojure.core/load-one/invokeStatic  core.clj: 5697
              clojure.core/load-one  core.clj: 5692
           clojure.core/load-lib/fn  core.clj: 5737
 clojure.core/load-lib/invokeStatic  core.clj: 5736
              clojure.core/load-lib  core.clj: 5717
                                ...                
    clojure.core/apply/invokeStatic  core.clj:  648
clojure.core/load-libs/invokeStatic  core.clj: 5774
             clojure.core/load-libs  core.clj: 5758
                                ...                
    clojure.core/apply/invokeStatic  core.clj:  648
  clojure.core/require/invokeStatic  core.clj: 5796
               clojure.core/require  core.clj: 5796

I have not counted the time it takes but my feeling is every 20 mins of the tests running. I already have a pretty high configuration, which I gathered from the boot wiki (but might be off):

export BOOT_JVM_OPTIONS="-Xmx2g -client -XX:MaxMetaspaceSize=1g -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Xverify:none -XX:-OmitStackTraceInFastThrow"

What else can I tweak? I also briefly investigated if it was pod/pod-pool's fault in a way. It probably is, but I could not figure out way during my first attempt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions