boot-test icon indicating copy to clipboard operation
boot-test copied to clipboard

Frequent java.lang.OutOfMemoryError: Metaspace

Open arichiardi opened this issue 9 years ago • 0 comments

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.

arichiardi avatar Jun 01 '16 19:06 arichiardi