Back-End (web)

[Intellij][Error] Update Error (heap size)

햄과함께 2019. 11. 18. 20:55
320x100

Problem

$ /Applications/IntelliJ\ IDEA.app/Contents/MacOS/idea

2019-11-12 18:27:18.418 idea[5457:202955] allVms required 1.8*,1.8+
2019-11-12 18:27:18.422 idea[5457:202960] Value of IDEA_VM_OPTIONS is (null)
2019-11-12 18:27:18.423 idea[5457:202960] Processing VMOptions file at /~~/Library/Preferences/IntelliJIdea2019.2/idea.vmoptions
2019-11-12 18:27:18.423 idea[5457:202960] Done
OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Error occurred during initialization of VM
Initial heap size set to a larger value than the maximum heap size

Intellij 업데이트 할 때 위와 같은 에러가 발생했다.

warning들은 일단 무시하고(deprecated Option이 있다고 이를 제거하라는 warning이다.) Error를 보면

 Error occurred during initialization of VM 

 Initial heap size set to a larger value than the maximum heap size 

라고 한다. heap size 가 잘못 세팅되어있다고 한다.


Solve

$ vi /~~~/Library/Preferences/IntelliJIdea2019.2/idea.vmoptions

위 로그에서 말해준 vmoption 파일을 열어보자.

# custom IntelliJ IDEA VM options

-Xms4g # 문제가 되는 부분
-Xmx2048m
-XX:MaxPermSize=512m
-XX:ReservedCodeCacheSize=1024m
-XX:+UseCompressedOops
-XX:+UseConcMarkSweepGC
-XX:+UseCodeCacheFlushing
-XX:SoftRefLRUPolicyMSPerMB=50

# 생략

문제가 되는 부분을 -Xms2048m 로 바꾸고 저장한 뒤 다시 실행하니까 제대로 동작하였다.

 

320x100