emacs-lsp / lsp-java

lsp-mode :heart: java
https://emacs-lsp.github.io/lsp-java
GNU General Public License v3.0
641 stars 89 forks source link

The old objects of eclipse.jdt.ls took up the entire heap space, and then emacs crashed. #259

Open awerdx520 opened 3 years ago

awerdx520 commented 3 years ago

When I use to open a project and use dap-java-debug to execute several times, the code prompt is very slow and the editing is not smooth. It crashed after executing emacs a few more times. I found that the heap of eclipse.jdt.ls is full, all objects of the old age. Garbage collection cannot reclaim any space. Then I set lsp-server-vmargs -Xmx2G, the same situation appeared again, but the time of appearance was extended. What happened? Does eclispse.jdt.ls retain the previously compiled and modified code objects every time?

jdk: openjdk-11 gc: G1

Other: default

yyoncho commented 3 years ago

I think that you should generate hprof file and report that in jdtls repo. It might be a bug in emacs infrastructure(e. g. not doing cleanup call) or memory leak in jdtls. In both cases the hprof will help out.

Also, it might be not a bug but an issue with your project being too bit to have several debug session at the time.

awerdx520 commented 3 years ago

ok, Thank you