Sbt (Scalatra building) goes down immediately with <2GB RAM
I installed the "Dropplet" / DigitalOcean server and gave it 512MB of RAM. when trying to run. / sbt script I get this failure immediately:
Using / root / .sbt / 0.13.0 as sbt dir, -sbt-dir to override.
VM warning on 64 bit OpenJDK server: INFO: os :: commit_memory (0x00000000a0000000, 1073741824, 0)> failed; error = 'Unable to allocate memory' (errno = 12)# Not enough memory for Java Runtime Environment to continue.
# Initial memory allocation (malloc) failed to allocate 1073741824 bytes for memory reservation.
1073741824 bytes ~ = 1.07GB. If I remove it to 1GB of RAM it fails, but it works when I give the server 2GB.
I've seen similar questions, but all of the answers were okay "provide more space" ... but is that okay? Why does sbt require a lot of memory to be allocated instantly? It doesn't seem to matter when it is actually being built. Is it possible to change the size of the memory that sbt is trying to allocate?
source share