Ask questionsLosing connection with error

<!-- Please search existing issues to avoid creating duplicates. --> <!-- All extension-specific issues should be created with the Extension Bug template. -->

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

Vultr server: 1 CPU 1024MB Memory 1000GB Bandwidth


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: 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":"","port":8443} WARN No certificate specified. This could be insecure. WARN Documentation on securing your setup: 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#


Answer questions meoz

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

Github User Rank List