-
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
Metals regularly disconnects from build server #1229
Comments
Hi @kylechadha, thanks for reporting. I've been using Metals on macOS and I've never encountered such issue. Does it happens always when you follow to reproduce steps? I can think of one thing currently, maybe your mac is killing some background processes before going to sleep?
|
HI @kpodsiad, thanks for taking a look! Glad to hear it's not expected behavior. Here's the results of metals doctor:
Performed all the steps in step 2 and see the same results from
However I noticed in the So perhaps it's some combination of sleep + time passing that results in the process getting killed? |
Thing with process being killed was just a guess, because I can't see other reason for disconnecting. @tgodzik me if I'm wrong, but Metals doesn't disconnect from build server without a reason (like explicit command from the user) |
It doesn't disconnect and should try to connect automatically if there is an exception. If you try manually running clean compile, does anything happen in the logs? I remember there was an issue with some bad state that Metals had, which was preventing things from getting compiled 🤔 |
I have the same issue with macOS 14 and 15 with M2 Pro and M3 Max. |
i've seen the same in the last weeks on linux/x64. i'll try to check whether i can find anything in the logs next time. |
This is the output: Error: Connection is disposed. |
I've also started to see Metals disconnecting. I think I found yet another issue, this one was with viewing bulk edit changes, but as you can see there is also OOM error.
|
I'm surprised the developers have not paid more attention to this issue. It's been open since 2022 and renders Metals basically unusable. |
Getting oom exception might come from a lot of different places, so this is really a catch all issue. I will take a look at the possible problems here, but you can also try to increase xmx in metals.serverProperties or even use a different GC that can return memory to the system. If possible, you can also I think set a parameter to dump heap on oom, which might be useful to indentify your issues in particular |
@tgodzik I will increase xmx and see if this will improve things. Where can I find this file? But to be honest, the reference development environment for Scala should work out of the box. |
As it's an open source project we always accept contributions that can help us achieve that ideal goal. |
@tgodzik Where can I find this setting to increase the memory? |
That's under |
Where can I find this property? Is there a config file? |
It's in the usual VS Code settings, where most other extensions and VS Code itself also have their settings. |
Setting xmx zu 8 GiB did not improve the situation really. |
So there is no info about OOM errors? IT might be a different cause then |
Describe the bug
Each time I come back to my machine after it has gone to sleep, I have to reconnect to the metals build server with
Metals: Connect to build server
To Reproduce Steps to reproduce the behavior:
Metals: Connect to build server
, after a minute things start working againExpected behavior
Metals would remain connected or auto-reconnect to build server
Installation:
The text was updated successfully, but these errors were encountered: