Open Disco-Dave opened 7 years ago
Are you saying vim is increasing in memory or the fsautocomplete process is increasing in memory? If it is the latter you may want to raise it in https://github.com/fsharp/FsAutoComplete.
It is normal for fsautocomplete to increase in memory as it never release projects it has parsed.
Yes it is fsautocomplete that increases in memory indefinitely and also appears to make more processes. This goes on to the point where my memory gets full and starts swapping. This problem doesn't seem to exist in vscode with ionide which also uses fsautocomplete. However i can still raise the issue with fsautocomplete.
Is there anyway I can disable fsautocomplete to keep it from running? Because it is mostly the syntastic support and the fsi commands that attract me to this plugin.
FsAutoComplete does the syntax checking so I wouldn't recommend disabling it. You will get one process per vim instance. There is no restart logic so I can't see how you can get more than one fsautocomplete instance per vim instance.
The FsAutoComplete's stay running even after vim is closed. This picture is taken about a minute after closing vim.
Fwiw, I've seen similar issues happen occasionally (fsautocomplete memory and cpu go crazy, and mono instance hangs around). I'm on (vim8 on Windows8). It's been too sporadic for me to track down so far, plus it hasn't quite annoyed me enough yet. I think it's hit me in sessions where I haven't used autocomplete, so I'm not sure if it is one of the periodic syntax checks. Just killing the mono instances and restarting vim gets me back where I need to be. That's not really an help, just commiserating and offering another datapoint.
@Disco-Dave I see the CPU is pegged at 100% on all your instances there. This could be due to https://github.com/fsharp/FsAutoComplete/issues/105 which I've occasionally seen. This may also explain why they are being left running as perhaps a background thread is still active and prohibiting the process for exiting.
@Disco-Dave @0x6a62 please add your experiences to https://github.com/fsharp/FsAutoComplete/issues/105 which may eventually provide enough information to work out why it happens.
It does look like the issue isn't due to vim-fsharp itself however although we could perhaps try to force kill the process on vim exit.
The problem is definitely occurring for me when Syntastic marks something as an error. I also noticed the autocompletion doesn't seem to work for fsharp either, so maybe there is something else going on.
My relevant Syntastic and vim-fsharp settings
" Syntastic
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 0
let g:syntastic_check_on_wq = 0
" Fsharp
let g:fsharp_only_check_errors_on_write = 1
let g:fsharp_xbuild_path = "/usr/bin/xbuild"
let g:fsharp_completion_helptext = 1
How my plugins are installed
let g:python_host_prog = '/usr/bin/python2'
let g:python3_host_prog = '/usr/bin/python3'
call plug#begin('/$HOME/.vim/plugged')
" Appearane Related
Plug 'flazz/vim-colorschemes'
Plug 'itchyny/lightline.vim'
" Enhancements
Plug 'christoomey/vim-tmux-navigator'
Plug 'ervandew/supertab'
" Tools
Plug 'raimondi/delimitmate'
Plug 'scrooloose/nerdcommenter'
Plug 'scrooloose/syntastic'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
" Language Support
Plug 'fsharp/vim-fsharp', {
\ 'for': 'fsharp',
\ 'dir': '~/.vim/plugged/vim-fsharp',
\ 'do': 'make fsautocomplete',
\}
Plug 'Valloric/YouCompleteMe', {
\ 'dir': '~/.vim/plugged/YouCompleteMe',
\ 'do': './install.py --all',
\}
call plug#end()
Rest of my vimrc stuff here
Mono
Mono JIT compiler version 5.0.0 (Stable 5.0.0.100/9667aa6 Wed Jul 12 17:00:30 UTC 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen (concurrent by default)
Just an additional info: I can confirm that problem using fsharp-mode with Emacs too, which uses FsAutoComplete. With a random session I easilly got 1.5 GB of memory usage. :(
Does the memory usage keep rising? Can you put up a repository with instructions of how to reproduce in Emacs?
@rneatherway sorry for the delayed response. Yes, the memory usage keep rising, but this happened in earlier days and I cannot reproduce anymore :(. This happened using the Fable.Template after install the nodejs
(nojo.js in portuguese) dependencies. But I'm still using emacs-fsharp-mode, so if I can reproduce this again I'll open a issue on the emacs repo, ok?
@rneatherway thanks for the attention. :)
This doesn't seem to be affecting me anymore.
@kjnilsson the fsac is a zombie issue can be fixed with new fsac argument --hostPID
(ref https://github.com/fsharp/FsAutoComplete/pull/190 )
So fsac will terminate itself if the vim process who started it is closed.
Vim should pass that argument with the vim process id
@enricosada nice - thank you.
I'm consistently getting a memory leak. If I try to autocomplete my memory keeps rising and I believe the fsautocomplete is the culprit. Is there anything I can do about this? If not is there is a way I can disable the fsautocomplete, as the auto completion is not necessary for me.
Also please let me know if I can provide any more info, thank you.
Image of vim and htop
My vim version is the following
my vimrc is the following