Getting OutOfMemory error while trying to update my Intellij

I am trying to upgrade IntelliJ IDEA from compilation 141.177 to 141.178. When the updated download of all necessary files and start the update, I get this error:

Temp. directory: /tmp java.lang.OutOfMemoryError: Java heap space at ie.wombat.jbdiff.JBPatch.bspatch(JBPatch.java:91) at com.intellij.updater.BaseUpdateAction.applyDiff(BaseUpdateAction.java:112) at com.intellij.updater.UpdateAction.doApply(UpdateAction.java:44) at com.intellij.updater.PatchAction.apply(PatchAction.java:184) at com.intellij.updater.Patch$3.forEach(Patch.java:308) at com.intellij.updater.Patch.forEach(Patch.java:360) at com.intellij.updater.Patch.apply(Patch.java:303) at com.intellij.updater.PatchFileCreator.apply(PatchFileCreator.java:84) at com.intellij.updater.PatchFileCreator.apply(PatchFileCreator.java:75) at com.intellij.updater.Runner.doInstall(Runner.java:295) at com.intellij.updater.Runner.access$000(Runner.java:18) at com.intellij.updater.Runner$2.execute(Runner.java:261) at com.intellij.updater.SwingUpdaterUI$5.run(SwingUpdaterUI.java:191) at java.lang.Thread.run(Thread.java:745) 

The /tmp folder should be in my root partition with a size of 20 GB, and currently it still has about 8GiB to the left. Therefore, I really do not understand that the problem may be here right now. Plus I'm not sure about the RAM part, my system uses 40% of my RAM when I do the update.

+7
java intellij-idea
source share
2 answers

Read the JetBrains documentation and this answer on how to increase maximum heap size for IntelliJ.

Set -Xmx2048m to idea.vmoptions (32-bit) or idea64.vmoptions (64-bit) and copy it to the appropriate location according to the documentation I mentioned above.

I would also do File > Invalidate Caches / Restart > Invalidate and Restart to make sure the changes are taken (maybe not necessary, but just in case).

I got the same stack trace today, trying to upgrade from 14.1.1 to 14.1.2 through an automatic updater. In OS X, I decided to rename it ~/Library/Preferences/IdeaIC14/idea.vmoptions to idea64.vmoptions . I already had -Xmx2048m installed in this file, but apparently it could not be read until I renamed it correctly.

Also see issue YouTrack IDEA-139036 (thanks to @Meo).

+8
source share

I got into the same problem. The problem is that idea.vmoptions changes memory for the main intellij process, but not the update process. In my case, only 500 m was allocated for the update process.

I walked past the problem, leaving the update window open after receiving the error. Then I launched ps -Af | grep java ps -Af | grep java (I am running linux). This showed me the command line for the upgrade process. I copied it and changed -Xmx500m to -Xmx1024m . Then I ran the modified command line in another console, after it was executed, I left the original update window, and everything was fine.

+13
source share

All Articles