Code-server: Losing connection with error

Created on 8 May 2019  路  4Comments  路  Source: cdr/code-server


  • code-server v1.939-vsc1.33.1
  • OS Version: ubuntu 18.04 x64

Vultr server:
1 CPU 1024MB Memory 1000GB Bandwidth

Description

I am able to start code-server and connect through the browser but after less than 1 minute the server disconnects and error's with log below.

Steps to Reproduce

root@appdev:~/myapp# root@appdev:~/myapp# code-server
(node:16060) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
INFO code-server v1.939-vsc1.33.1
INFO Additional documentation: http://github.com/codercom/code-server
INFO Initializing {"data-dir":"/root/.local/share/code-server","extensions-dir":"/root/.local/share/code-server/extensions","working-dir":"/root/myapp","log-dir":"/root/.cache/code-server/logs/20190508145306551"}
INFO Starting webserver... {"host":"0.0.0.0","port":8443}
WARN No certificate specified. This could be insecure.
WARN Documentation on securing your setup: https://github.com/codercom/code-server/blob/master/doc/security/ssl.md
INFO
INFO Password: 3df65cd56cer8c327a789aa5
INFO
INFO Started (click the link below to open):
INFO http://localhost:8443/
INFO
INFO Starting shared process [1/5]...
internal/child_process.js:366
throw errnoException(err, 'spawn');
^

Error: spawn ENOMEM
at ChildProcess.spawn (internal/child_process.js:366:11)
at Object.spawn [as _spawn] (child_process.js:538:9)
at t.async (/home/travis/build/codercom/code-server/packages/server/out/cli.js:504:34598)
at e.exports (/home/travis/build/codercom/code-server/packages/server/out/cli.js:504:34099)
at e (/home/travis/build/codercom/code-server/packages/server/out/cli.js:504:32722)
at Timeout.u [as _onTimeout] (/home/travis/build/codercom/code-server/packages/server/out/cli.js:504:33015)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)
root@appdev:~/myapp#

bug

All 4 comments

The server is dying because it ran out of memory.

You could try adding more memory to your VPS or adding swap

The server is dying because it ran out of memory.

You could try adding more memory to your VPS or adding swap

Thanks adding swap did the trick

The server is dying because it ran out of memory.
You could try adding more memory to your VPS or adding swap

Thanks adding swap did the trick

What's your current config(RAM and swap)? I too faced this issue in 2GB RAM and 512MB swap.

The server is dying because it ran out of memory.
You could try adding more memory to your VPS or adding swap

Thanks adding swap did the trick

What's your current config(RAM and swap)? I too faced this issue in 2GB RAM and 512MB swap.
Just added a swap with double the size of the ram.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nol166 picture nol166  路  3Comments

avelino picture avelino  路  3Comments

rcarmo picture rcarmo  路  3Comments

sa7mon picture sa7mon  路  3Comments

RealSlimMahdi picture RealSlimMahdi  路  3Comments