I'm trying to use sbt on an amazon ec2 micro instance but I'm getting this error when I execute sbt command.
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
Any ideas?
Thank you in advance!
The following are common reasons why EC2 Instance Connect might not work as expected: EC2 Instance Connect doesn't support the OS distribution. The EC2 Instance Connect package isn't installed on the instance. There are missing or incorrect AWS Identity and Access Management (IAM) policies or permissions.
The "UnauthorizedOperation" error indicates that permissions attached to the AWS Identity and Access Management (IAM) role or user trying to perform the operation doesn't have the required permissions to launch EC2 instances.
Launching EC2 instance failed. Cause: You have reached the limit on the number of instances that you can launch in a Region. When you create your AWS account, we set default limits on the number of instances you can run on a per-Region basis.
You have to run sbt with a switch limitting the used memory to be less than the available on machine.
Instead of editing files, I run sbt with sbt -mem 256
for example to get -Xmx
and -Xms
to 256MB. Works fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With