Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sbt not working on amazon ec2 micro instance

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!

like image 995
Rodrigo Cifuentes Gómez Avatar asked Apr 14 '14 15:04

Rodrigo Cifuentes Gómez


People also ask

Why is my EC2 instance not connecting?

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.

Why am I receiving the error message you are not authorized to perform this operation when I try to launch an EC2 instance?

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.

What could cause the EC2 instances to fail to launch?

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.


1 Answers

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.

like image 153
lpiepiora Avatar answered Sep 19 '22 18:09

lpiepiora