Back to LanguageTool Homepage - Privacy - Imprint

RAM consumption

Hi everybody, I was running a LT server, using the package languagetool-server.jar version 5.7 (I tried version 5.8 too) and I noticed a huge memory consumption.
Each time I was opening a software that was using my local http server API to get correction, the memory use increased and when I closed it, the memory wasn’t released. So it leads to over 1Gb use of ram.
I found this subject, and and followed the advice that I got on LT twitter, to use -Xmx500M for example, but unfortunately it didn’t work.
can anybody tell me how to solve this issue or if it is even possible without changing LT code ?

I’m quite sure it works (it’s on the level of the Java virtual machine), but the memory you measure might show a different value, depending on what number exactly you look at. Plus, there might be a bit of overhead. In any case, -Xmx400M should use less memory than e.g. -Xmx500M (but it might not be enough).

Ok, I’ll try with 250M and hope it’ll stop under 500M.
This is what I used to look at the ram consumption (htop) the res column, LanguageToolRAM|690x204.

Unfortunately, with -Xmx 250M I got this error while some time after runnig the http server : org.languagetool.server.LanguageToolHttpHandler Handled request in 378ms; sending code -1 java.lang.OutOfMemoryError: Java heap space
and the process was over 500M ram usage.