question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: code server goes to "Sleeping State" when closing the browser

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Chrome
  • Local OS: Windows 11
  • Remote OS: Ubuntu 20.04
  • Remote Architecture: amd64
  • code-server --version: 4.7.0

Steps to Reproduce

  1. open code-server (I’m using k8s and run the pod with cpu limit N)
  2. run some heavy cpu-bound job in the terminal of code-server client (something like stress -c N)
  3. close the browser
  4. code-server (parent pid) and child processes including cpu-bound job go to sleeping state occassionally.

Expected

The server should be in a running state regardless of client connection

Actual

The code-server process should be in a running state but occasionally goes to a sleeping state. This leads to other terminal child processes also going to a sleeping state.

Logs

image

Screenshot/Video

image

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

I wonder if this is expected behavior.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Crelingcommented, Oct 1, 2022

Well, I think background jobs should be guaranteed alive by tmux, screen or something similiar, but not code-server.

If you ssh to a remote server and run some jobs, you should not expect it to keep working after closing the ssh connection, so do code-server.

1reaction
code-ashercommented, Sep 28, 2022

What do you mean by the process going into a sleeping state? I think VS Code kills terminal processes if they are not reconnected within a timeout, could that be the cause?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chrome Hangs after Resume from Sleep / Hibernate
The only solution for me is to close browser before start hibernate state or disable hibernate or close and reopen browser after hibernate....
Read more >
The system has rebooted without cleanly shutting down first
Scenario 1: The computer restarts because of a Stop error, and Event ID 41 contains a Stop error (bug check) code. When a...
Read more >
JavaScript sleep/wait before continuing [duplicate]
1 Answer 1 · 35. It freezes browser, and if you do sleep more than 10 seconds, browser shows alert: A script on...
Read more >
What went wrong? Troubleshooting JavaScript - MDN Web Docs
This is a pretty easy error to track down, and the browser gives you ... live server on your local machine, this will...
Read more >
Keep Jupyter Notebook Running Even After Browser is ...
Keeping the browser tab open to run Jupyter Notebook files for days is not the ... the execution in error, it may be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found