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

Frequent java.lang.OutOfMemoryError: Metaspace #26

Open
arichiardi opened this issue Jun 1, 2016 · 0 comments · May be fixed by boot-clj/boot#474
Open

Frequent java.lang.OutOfMemoryError: Metaspace #26

arichiardi opened this issue Jun 1, 2016 · 0 comments · May be fixed by boot-clj/boot#474

Comments

@arichiardi
Copy link

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 added a commit to arichiardi/boot that referenced this issue Jun 23, 2016
This was particularly evident when doing `boot watch test` and has been fixed thanks to Micha's
intuition of adding a clojure.core/shutdown-agents in boot.pod/destroy-pod.

Fixes adzerk-oss/boot-test#26
@arichiardi arichiardi linked a pull request Jun 23, 2016 that will close this issue
arichiardi added a commit to arichiardi/boot that referenced this issue Jun 23, 2016
This was particularly evident when doing `boot watch test` and has been fixed thanks to Micha's
intuition of adding a clojure.core/shutdown-agents in boot.pod/destroy-pod.

Fixes adzerk-oss/boot-test#26
arichiardi added a commit to arichiardi/boot that referenced this issue Jun 29, 2016
In order to fix memory leaks in task-local pods, we need a way to execute custom cleaning at pod
destroy time. This was particularly evident when doing `boot watch test` in a resource heavy app.

Fixes adzerk-oss/boot-test#26
arichiardi added a commit to arichiardi/boot that referenced this issue Jun 29, 2016
In order to fix memory leaks in task-local pods, we need a way to execute custom cleaning at pod
destroy time. This was particularly evident when doing `boot watch test` in a resource heavy app.

Fixes adzerk-oss/boot-test#26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant