Why do I get a "java.lang​.OutOfMemo​ryError" or "there is insufficient memory for the Java Runtime Environment to continue" when deploying a silent install using SCCM on a Windows 10 machine?

47 ビュー (過去 30 日間)
When deploying a silent installation of MATLAB using SCCM (ConfigMgr) on a Windows 10 machine, why do I get the following text:
java.lang.OutOfMemoryError
or
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 33952 bytes for Chunk::new
# Possible reasons:
# The system is out of physical RAM or swap space
# In 32 bit mode, the process size limit was hit
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Use 64 bit Java on a 64 bit OS
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# This output file may be truncated or incomplete.
#
# Out of Memory Error (allocation.cpp:390), pid=9848, tid=0x0000000000002d2c
#
# JRE version: Java(TM) SE Runtime Environment (8.0_181-b13) (build 1.8.0_181-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.181-b13 mixed mode windows-amd64 compressed oops)
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows

採用された回答

MathWorks Support Team
MathWorks Support Team 2022 年 5 月 3 日
編集済み: MathWorks Support Team 2022 年 5 月 3 日
This is a memory error that can occur when the user is deploying a silent installation from ConfigMgr on a Windows 10 64-bit machine and the installer is highly compressed.  
To negate the memory issue, check the check box “Run installation and uninstallation program as a 32-bit process on 64-bit clients” in the ConfigMgr dialog settings.
This option allows for the user to install MATLAB 64-bit to the computer by using the 32-bit thread.
  2 件のコメント
Jessie Twaddle
Jessie Twaddle 2020 年 8 月 10 日
Or is it possible in someway to decompress the installer so it doesn't have this issue when doing a silent install?

サインインしてコメントする。

その他の回答 (1 件)

polsky edd
polsky edd 2022 年 10 月 11 日
Increasing the heap size is a bad solution, 100% temporary, because you will hit the same issue if you get several parallel requests or when you try to process a bigger file. Normally this is a runtime error in Java which occurs when you allocate a new object in your application over a period of time continuously and the Garbage Collector (GC) cannot make space available to accommodate a new object, and the heap cannot be expanded further, which resulted this error.
Therefore you pretty much have the following options:
  • Find the root cause of memory leaks with help of profiling tools like MAT, Visual VM , jconsole etc. Once you find the root cause, You can fix this memory leaks.
  • Optimize your code so that it needs less memory, using less big data structures and getting rid of objects that are not any more used at some point in your program.
To avoid OutOfMemoryError, write high performance code:
  • Use local variables wherever possible.
  • Release those objects which you think shall not be needed further.
  • Avoid creation of objects in your loop each time.

Community Treasure Hunt

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

Start Hunting!

Translated by