-
Notifications
You must be signed in to change notification settings - Fork 78
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
Quiting vscode-metals keeps still one java process #204
Comments
Thanks for reporting! Is this a Metals process or Bloop? There should be more info in the name. Bloop is a build server and we share it between instances, so it is not killed automatically when quiting VS Code. Especially that it can be used from CLI as well. |
@tgodzik hmm looks like bloop: |
but if its a bloop, then question: do I need to kill it always by myself ? this bloop hanging there is the one that is automatically run by vscode. I am not starting it by my self. |
@maciejbak85 thank you for reporting! This is working as expected, the Bloop process is supposed to continue running after Metals exits. The Bloop process is reused between multiple Metals servers if you're for example working on multiple projects. Is this process causing problems? I'm open to discuss options for how we could automatically shut down the Bloop server when there is no active Metals client. This process does consume memory, which I understand may be undesirable. Maybe we could extend Bloop to turn itself off if there are no requests after some timeout 🤔 |
ok thanks for the info, at least I know that it is expected behaviour :) |
Yes, turning the server off automatically (by default after a period of inactivity, or configurably when there are no more connected clients) would be very desirable as it is quite a heavy process, often consuming over 2 Gb of memory. |
@jvican what do you think about adding a timeout to Bloop, would that be sensible? We could have it as an additional property, which would be set when running from Metals. Though most likely it should be specified explicitly by the user. |
Closing this, as automatically shutting down Bloop is not something that we will likely support. It is optimized for users doing Scala daily and having a single Bloop server means we can have a lot of different workspaces with a limited amount of memory used. To optimize it further you can use We should soon be able to run |
This is a feature, not a bug? scalameta/metals-feature-requests/issues/147 It would be nice if it featured some kind of "apoptosis" and would just exit without fuss if left unused for N minutes or something. |
@cbrunnkvist the purpose of Bloop is to provide compilation for more than one workspace, which is why it's kept alive between Metals sessions. We could probably try to work on some auto shutdown for Bloop if the workspace is not used for a longer time. This is however unclear what delay we should have. |
In my case, that process is 10G of memory, so not idea keeping it around. |
I also have issues when this process keeps hanging even after I stop working on Scala project and start working on something different. Could this be some sort of configuration option? If you want it to keep running or shut down after some timeout? |
This is totally unacceptable default behavior. If Metals starts the process then it should kill it at shut down, no discussion! Leaving Java processes hanging around just in case it may be needed again later is counter-intuitive and could at best be acceptable as an option. The general user does not need this and will not see restarting the process for subsequent Metals use as a problem. |
Thanks for the comment, however I would ask you keep your comments more friendly and productive. Contributors are more likely to respond if you do so. This is an open source project with a lot of different people involved and there certainly needs to be a discussion, since this is not as simple. We keep this process alive to be used by different workspaces and also to make sure the compile is hot (JITted) to provide the best experience possible. Instead of what you wrote you could write something like:
There is a feature request that you might be interested in: scalameta/metals-feature-requests#129 It can be voted on to make sure we take care of it first. |
Sorry if my remark sounds unfriendly, it was not meant to be. I found this by Googling the issue. Since others did put this more subtly and the issue was then closed as wont-fix I intended to be a bit more explicit. Please note that I do appreciate all the work that people are putting into this and do not want to offend anyone. I will vote for the other issue. |
…rn/fp-ts-2.8.6 Bump fp-ts from 2.8.5 to 2.8.6
Try to open Vscode + metals, work a bit, then quit vscode.
One Java process is still running in the system, and will run forever.
Java process should be quit as well
here is the screenshot:
https://imgur.com/a/7nJg3IY
The text was updated successfully, but these errors were encountered: