java.lang.​OutOfMemor​yError について

MATLAB R2016b (9.1.0.441655) 64-bit (glnxa64) is used to predict survey information.
About three days ago, the following error occurred, and it examined in various ways and it understood to the place where Java heap area was short.
ExceptionObject: [1×1 java.lang.OutOfMemoryError] identifier: 'MATLAB:Java:GenericException' message: 'Java exception occurred: ...' cause: {} stack: [3×1 struct]
I checked the setting method on the MATLAB side, but I understood how to set it from the management screen by GUI, but because of AWS the GUI can not be used and I do not know how to set it.
It is saved if someone can tell me how to set it from the command line.
In addition, I think whether the memory use situation of AWS has no problem. KiB Mem: 60614968 total, 56340112 free, 1448516 used
Thank you.

 Accepted Answer

You can change Java heap size by editing $prefdir/matlab.prf file.
By default in Linux MATLAB R2016b, $prefdir is would be /home/USER/.matlab/R2016b. If you want to increase Java heap size to 4,000MB, try the following.
vi /home/USER/.matlab/R2016b/matlab.prf
and add ( or change if JavaMemHeapMax is already existing)
JavaMemHeapMax=I4000
Then restart MATLAB, the Java heap size will be changed.

1 Comment

turinavi
turinavi on 14 Mar 2018
Thank you very much. I will check it.

Sign in to comment.

More Answers (0)

Categories

Find more on 環境と設定 in Help Center and File Exchange

Products

Asked:

on 14 Mar 2018

Commented:

on 14 Mar 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!