Code-server: `fork: Cannot allocate memory` on aws t2.micro instance.

Created on 25 Jun 2019  路  4Comments  路  Source: cdr/code-server


  • code-server version: v1.1156-vsc1.33.1
  • OS Version: aws, amazon linux, irrelevant

Description

OK, I know t2.micro is not suggested, but it has 1gb memory. :-)
Running code-server on t2.micro result in fork: Cannot allocate memory.

Steps to Reproduce

  1. run code-server on aws ec2 t2.micro
  2. try doing sth. now :-)
bug

Most helpful comment

@coadler good idea. I tried it, everything works well (at least for now). I noticed that it requires at least 1GB free swap space to work. I allocated a 4GB swap file for it. It works.

Very much thanks for the idea.

It is a t2.micro instance with EBS gp2 SSD storage (everything within free tier), FYI.

All 4 comments

This is a known problem due to the limited amount of resources that the t2.micro provides.

We're working on reducing the memory footprint of our code-server binaries.

Adding swap will let you run code server on 1gb or 512mb vms

@coadler good idea. I tried it, everything works well (at least for now). I noticed that it requires at least 1GB free swap space to work. I allocated a 4GB swap file for it. It works.

Very much thanks for the idea.

It is a t2.micro instance with EBS gp2 SSD storage (everything within free tier), FYI.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RealSlimMahdi picture RealSlimMahdi  路  3Comments

infogulch picture infogulch  路  3Comments

justmao945 picture justmao945  路  3Comments

avelino picture avelino  路  3Comments

pchecinski picture pchecinski  路  3Comments