IntelliJ IDEA always asks for more memory


This issue started happening just randomly a few days ago. Whenever I open IntelliJ IDEA it either asks for more heap, and I have given already 3000MB, or whenever I try to run tests, it fails with OutOfMemoryError. Overall experience became awful, and every time I open new source file, IDE freezes for a minute. Intellisense is also slow when writing code and sometimes appears very late.

Meanwhile, when idling, IDE uses all of its memory and you can see it on the screenshot attached. Might it be a memory leak? It started happening on the last version 2020.2.2. However, I decided to uninstall it and installed 2020.1 but the same behavior persists. I ran memory test on my machine and no errors were found. Any ideas what is going on? I never had such an issue earlier. I will appreciate any help.


Some info about the environment.


OS: Windows 10.



This is an error thrown when running tests:

Full stacktrace:

Error:Internal error: (java.lang.OutOfMemoryError) Java heap space
java.lang.OutOfMemoryError: Java heap space
at org.jdom.Element.getAttributeList(
at org.jdom.Element.setAttribute(
at com.intellij.openapi.util.SafeStAXStreamBuilder.processElement(
at com.intellij.openapi.util.SafeStAXStreamBuilder.processElementFragment(
at com.intellij.openapi.util.JDOMUtil.loadUsingStaX(
at com.intellij.openapi.util.JDOMUtil.load(
at org.jetbrains.jps.model.serialization.JpsLoaderBase.tryLoadRootElement(
at org.jetbrains.jps.model.serialization.JpsLoaderBase.loadRootElement(
at org.jetbrains.jps.model.serialization.JpsLoaderBase.loadRootElement(
at org.jetbrains.jps.model.serialization.JpsLoaderBase.loadComponentData(
at org.jetbrains.jps.model.serialization.JpsProjectLoader.loadComponentData(
at org.jetbrains.jps.model.serialization.JpsLoaderBase.loadComponents(
at org.jetbrains.jps.model.serialization.JpsProjectLoader.loadFromDirectory(
at org.jetbrains.jps.model.serialization.JpsProjectLoader.loadProject(
at org.jetbrains.jps.model.serialization.impl.JpsSerializationManagerImpl.loadModel(
at org.jetbrains.jps.cmdline.JpsModelLoaderImpl.loadModel(
at org.jetbrains.jps.cmdline.BuildRunner.load(
at org.jetbrains.jps.cmdline.BuildSession.runBuild(
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$$Lambda$76/ Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.base/java.util.concurrent.ThreadPoolExecutor$
at java.base/
1 comment
Comment actions Permalink

Can you please collect additional information for the investigation?

  • Disable all third-party plug-ins.
  • Quit the IDE.
  • Remove the logs folder.
  • Launch the IDE, reproduce the problem, and capture a memory snapshot. (Help | Diagnostic Tools | Capture Memory Snapshot)
  • Attach a snapshot along with a log folder compressed.

The files can be uploaded at (do not forget to specify the Upload ID)


Please sign in to leave a comment.