-
Notifications
You must be signed in to change notification settings - Fork 770
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
Shutdown ycmd if the editor is gone? #927
Comments
After some time of inactivity, ycmd is supposed to shut itself down. Is
this not happening? I can't check what is the timeout we specified right
now.
…On Feb 15, 2018 4:24 PM, "Sam McCall" ***@***.***> wrote:
If I start vim + YCM, ycmd is a child of vim.
Then if vim exits uncleanly, ycm keeps running as a child of init.
Can ycmd detect this and shut down?
I'm still trying to debug why vim+ycm isn't shutting down ycmd in my
setup, but this seems like a reasonable robustness/defense-in-depth
measure. When I noticed the problem I had 10s of ycmds running, each with a
language server hanging off it...
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#927>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHbkU_ZSp1Hhiu-O_x0hMzKeCLQRaMWqks5tVExLgaJpZM4SHA-4>
.
|
By the way, ycmd not shutting down after exiting Vim could be due to a bad interaction with another plugin. See this entry in the FAQ. |
I take it you’re using the java completer? Could you post the logs please ? |
Thanks, I did find the FAQ entry and eventually tracked it down to an old script I had installed. That makes VimLeave seem like a pretty fragile mechanism to rely on, so I guess I should expect the timeout to be the way ycmd shuts down for some fraction of users. I guess the timeout works well enough. I was remembering it being ~a day, but looks like that changed years ago. 30 minutes is still a bit inconvenient:
It seems like losing the parent could result in shutdown within seconds instead of minutes, but maybe this isn't worth fixing. @puremourning It's not the Java language server, but rather clangd with a fairly simple out-of-tree completer (would be nice to upstream it at some point, but my attempts to slot clangd into the LSP completer framework didn't work well so far). Happy to share our completer and my attempt at using the upstream LSP support if that'd be helpful. |
Clangd
I managed to get Clangd to work with ycmd using the LSP completer. The
reason there isn't a PR yet is that it's not at feature parity with the
current implementation.
…On Feb 15, 2018 6:51 PM, "Sam McCall" ***@***.***> wrote:
Thanks, I did find the FAQ entry and eventually tracked it down to an old
script I had installed. That makes VimLeave seem like a pretty fragile
mechanism to rely on, so I guess I should expect the timeout to be the way
ycmd shuts down for some fraction of users.
I guess the timeout works well enough. I was remembering it being ~a day,
but looks like that changed years ago. 30 minutes is still a bit
inconvenient:
- the language server eats multiple GB of ram (it didn't free any
because it doesn't know the docs are closed)
- a workflow that ends up opening and closing vim a lot can end up
with a lot of ycmds in 30 minutes (I ended up with 15 running when I
checked)
It seems like losing the parent could result in shutdown within seconds
instead of minutes, but maybe this isn't worth fixing.
@puremourning <https://github.com/puremourning> It's not the Java
language server, but rather clangd with a fairly simple out-of-tree
completer (would be nice to upstream it at some point, but my attempts to
slot clangd into the LSP completer framework didn't work well so far).
Happy to share our completer and my attempt at using the upstream LSP
support if that'd be helpful.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#927 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AHbkU8WUXqc5zKKDBQjvu8yBxxCnZpssks5tVG62gaJpZM4SHA-4>
.
|
Cool! No parity with libclang on the clangd side or ycmd side? The issues I remember were:
We think/hope clangd is are parity feature-wise, if not stability |
Sorry, this is way off topic. I'll open a new issue for clangd support tomorrow unless someone gets there first. |
I wrote a clangd completer implementation as part of the development of the java completer. this was working at one point, and took about 30 minutes to integrate with our LSP implementation. I doubt it works now, due to API changes during code review full details on the java PR description |
@puremourning It doesn't work anymore, it was easier for me to write one
from scratch than to fix the existing one.
|
I realise that, i was responding to:
|
Given that the server shuts down after 30 mins of inactivity and you're not using an "official" completer, and the problem was with another plugin... I think we can close this. |
If I start vim + YCM, ycmd is a child of vim.
Then if vim exits uncleanly, ycm keeps running as a child of
init
.Can ycmd detect this and shut down?
I'm still trying to debug why vim+ycm isn't shutting down ycmd in my setup, but this seems like a reasonable robustness/defense-in-depth measure. When I noticed the problem I had 10s of ycmds running, each with a language server hanging off it...
The text was updated successfully, but these errors were encountered: