OutOfMemoryError: insufficient memory in IntelliJ?
Asked Answered
S

3

18

When I run my project in IntelliJ in debug mode I get the following error.

Does anybody know what is the cause? enter image description here

I already increased my heap size in idea.vmoptions:

-ea
-server
-Xms1g
-Xmx3G
-Xss16m
-Xverify:none
-XX:PermSize=512m
-XX:MaxPermSize=1024m

I already increased my heap size for compiler to 1024 as bellow: enter image description here

Scintillate answered 9/2, 2015 at 14:15 Comment(2)
It isn't a regular practice to have outofmemoryexceptions generally this means your code is poorly optimized probably written wrongly somewhere. Although it is possible to increase heap size the general cause isn't the actually heap size and it more likely programming conventions or mistakes. Come back with code, show us your thread.Repay
I ran into this issue, and increasing "Build process heap size" fixed it for meContortionist
G
15

Try Run menu -> Edit Configurations... -> find your project in the tree of projects on the left, look for VM options: in the panel on the right, and enter something there, according to information found here: What are the -Xms and -Xmx parameters when starting JVM?

Glyptodont answered 9/2, 2015 at 14:25 Comment(0)
S
0

It is very strange still i don't understand why but I resolved it by decreasing the size of VM Options: -Xmx820m. Maybe because i use jre 32 bit en my Intellij IDE runs on 64 bit.

Scintillate answered 10/2, 2015 at 12:0 Comment(0)
C
0

Try using -Xmx512m and restart after invalidate caches, it helped me.

Creak answered 6/5, 2024 at 20:19 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.