Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/scala/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Scala sbt在amazon ec2微实例上不工作_Scala_Amazon Web Services_Amazon Ec2_Sbt_Openjdk - Fatal编程技术网

Scala sbt在amazon ec2微实例上不工作

Scala sbt在amazon ec2微实例上不工作,scala,amazon-web-services,amazon-ec2,sbt,openjdk,Scala,Amazon Web Services,Amazon Ec2,Sbt,Openjdk,我试图在AmazonEC2微实例上使用sbt,但在执行sbt命令时遇到了这个错误 mkdir prueba cd prueba sbt There is insufficient memory for the Java Runtime Environment to continue. Native memory allocation (malloc) failed to allocate 715849728 bytes for committing reserved memory 有什么想法

我试图在AmazonEC2微实例上使用sbt,但在执行sbt命令时遇到了这个错误

mkdir prueba
cd prueba
sbt

There is insufficient memory for the Java Runtime Environment to continue.
Native memory allocation (malloc) failed to allocate 715849728 bytes for committing reserved memory
有什么想法吗


提前谢谢你

我曾经在EC2 micro上运行
sbt
。以前,SBT可用于256M堆或更小的堆。试着像这样跑

export SBT_OPTS=“-Xms128M-Xmx256M-Xss1M-XX:+cmsclasssunloadingerabled-XX:MaxPermSize=256M”


java$SBT\u OPTS-jar
dirname$0
/SBT-launch.jar“$@”

您必须使用开关运行SBT,将使用的内存限制为小于机器上可用的内存


我没有编辑文件,而是使用
sbt-mem256
运行sbt,例如将
-Xmx
-Xms
设置为256MB。工作正常。

也许“micro”对于SBT来说太小了?消息很清楚,SBT启动程序脚本要求的初始堆大小不可用。它试图分配比微实例可用内存多得多的内存。微实例只有613MB的物理内存。您的应用程序正在尝试分配682MB。谢谢您的回答。最后,我在/etc/sbt/中编辑了sbopts文件并更改了内存值。谢谢您的回答。最后,我在/etc/sbt/中编辑了sbopts文件并更改了内存值。