Skip to content

Code-server instances "stay open" after being closed from browser #4351

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Sharpz7 opened this issue Oct 13, 2021 · 10 comments
Closed

Code-server instances "stay open" after being closed from browser #4351

Sharpz7 opened this issue Oct 13, 2021 · 10 comments
Labels
waiting-for-info Waiting for more information from submitter

Comments

@Sharpz7
Copy link

Sharpz7 commented Oct 13, 2021

OS/Web Information

  • Web Browser: Chrome
  • Local OS: Windows
  • Remote OS: Docker Linux
  • Remote Architecture: Docker Compose Contianer
  • code-server --version:

Steps to Reproduce

  1. Open htop
  2. Open multiple tabs and close them again when code-server loads
  3. The instance stays open, with HTOP showing that the CPU usuage and RAM increases with each closed instance until it crashes.

Expected

The RAM and CPU usage should decrease after the instance is closed

Actual

It doesn't :)

Logs

https://files.mcaq.me/8xad.png
I also don't understand why the code-server items are tied to my user "adam" instead of root. This doesn't make much sense to me?

This is difficult to show with logs, or at least I don't know how to do it well with my setup.

@geiseri
Copy link
Contributor

geiseri commented Oct 15, 2021

This is 50% by design but also related to #3947. The idea is that you can keep a session alive, but you should be able to close the instance when you close the folder.

@code-asher
Copy link
Member

Does the reproduction require opening a terminal or does this happen when opening code-server without a terminal open?

@Sharpz7
Copy link
Author

Sharpz7 commented Oct 18, 2021

After further testing, it seems to be based on a timeout?

So after x mins, the instances close.

@code-asher
Copy link
Member

Ahh yup the timeout is in case the connection drops so the browser can reconnect. If there is no reconnection within the timeout the terminal instance is killed.

@Sharpz7
Copy link
Author

Sharpz7 commented Oct 18, 2021

Does this issue extend to each reload of the page? I reloaded my page 3 times and the RAM usage went to 8GB with the SWAP being maxed to. maxed out my 4 cores as well and crashed all my docker containers.

I then tried removing a bunch of my extensions, bracketizers, spelling checkers, CSS navigators and tabnine. I reckon whats happened is one of them was running in the background and then not closing again? I don't have time for a full testing session for all the extensions (tbh I don't need them) but I could provide a list for you guys?

https://files.mcaq.me/mvrt.png
My usage has now dropped significantly

@code-asher
Copy link
Member

code-asher commented Oct 25, 2021 via email

@Sharpz7
Copy link
Author

Sharpz7 commented Oct 25, 2021 via email

@code-asher
Copy link
Member

code-asher commented Oct 25, 2021 via email

@Sharpz7
Copy link
Author

Sharpz7 commented Oct 25, 2021 via email

@code-asher code-asher added the waiting-for-info Waiting for more information from submitter label Oct 27, 2021
@Sharpz7
Copy link
Author

Sharpz7 commented Oct 29, 2021

Alright. So since upgrading to 3.12.0 I have not had this issue. There are two reasons why that could be the case:

  • Tabnine wasn't the issue
  • 3.11.1 was the issue (I think this is likely, I had tabnine in versions before this with no issues

Regardless, I do not have the time to test this completely, especially after I have just got 3.12.0 working.

Thanks for all the help

@Sharpz7 Sharpz7 closed this as completed Oct 29, 2021
@Sharpz7 Sharpz7 mentioned this issue Jun 1, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-info Waiting for more information from submitter
Projects
None yet
Development

No branches or pull requests

3 participants