1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

InteliJでOutOfMemoryErrorが出たときの対処法

Last updated at Posted at 2021-11-01

JVMのMaximun heap size, MBを設定する

メニューバーのIntelliJ > Preferences > Build, Execution, Deployment > Build Tools > sbtMaximun heap size, MBを設定する(下の設定画面では4086に設定している).
image.png

idea.vmoptionsファイルの設定を書き換える

メニューバーのHelp > Edit Custom VM Options...をクリックすると~/Library/Application Support/JetBrains/IdeaICxxxx.x/idea.vmoptionsが開かれるので-Xmx項目の数値を変更する(下のコードでは4086に設定している).

-Xms128m
-Xmx4096m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-XX:CICompilerCount=2
-Dsun.io.useCanonPrefixCache=false
-Djdk.http.auth.tunneling.disabledSchemes=""
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Djdk.attach.allowAttachSelf=true
-Dkotlinx.coroutines.debug=off
-Djdk.module.illegalAccess.silent=true
-XX:+UseCompressedOops
-Dfile.encoding=UTF-8

-XX:ErrorFile=$USER_HOME/java_error_in_idea_%p.log
-XX:HeapDumpPath=$USER_HOME/java_error_in_idea.hprof
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?