codeium.vim icon indicating copy to clipboard operation
codeium.vim copied to clipboard

Title: Limiting the number of processes in codeium.vim

Open xuwei152 opened this issue 2 years ago • 12 comments

I'm using codeium.vim on a server where I don't have root access. The service only allows users to run up to 200 processes. However, codeium.vim creates too many processes as shown in the attached image. I was wondering if there's a way to limit the number of processes created by Codium.

image

Thanks in advanece

xuwei152 avatar Mar 27 '23 10:03 xuwei152

There should only be one codeium process per nvim process. The fact that you have so many suggests that maybe many processes are not being killed when nvim exits. I can look into this.

fortenforge avatar Mar 27 '23 17:03 fortenforge

Curious if #102 fixes this issue for you. We now explicitly call jobstop upon VimLeave which should kill the language server process.

fortenforge avatar Mar 28 '23 00:03 fortenforge

Indeed, after exiting Neovim, all processes of Codeium are terminated. However, my typical usage scenario involves opening two panes in Tmux - one to open Neovim and one to run a program, as shown in the figure below. Since Codeium uses too many processes, I have to exit Neovim in order to run the program with multithread. Therefore, I hope to limit the number of processes so that I can run multi-threaded programs without closing Neovim.

image

xuwei152 avatar Mar 28 '23 08:03 xuwei152

Hmm, I'm not sure why we're launching so many processes then.

can you add the following line to function! s:ActuallyStart() abort inside codeium.vim/autoload/codeium/server.vim?

call codeium#log#Error('Starting language server.')

And then the following line to your init.nvim file:

let g:codeium_log_file = '/home/<user>/codeium.log`

Then tail the log file and let us know what actions cause Starting language server to get printed?

fortenforge avatar Mar 29 '23 19:03 fortenforge

Sorry for the late reply. I have attached the log file. codeium.log

xuwei152 avatar May 02 '23 14:05 xuwei152

image

got similar issue, codeium created many curl task during usage, but all of them would exit properly when vim exited

ZSaberLv0 avatar Jun 25 '23 10:06 ZSaberLv0

@ZSaberLv0, @xuwei152 have you solved this issue?

vamsikun avatar Jun 27 '23 09:06 vamsikun

@ZSaberLv0 If curl is hanging, maybe you can try adding an argument like --max-time to the invocations of curl in the plugin. Is the service working otherwise? If we need to investigate further maybe you can make a new issue, seems like this is sufficiently different.

pqn avatar Jun 29 '23 23:06 pqn

No, the issue is still there. I have to close neovim when I use a multithreading program like fzf.

xuwei152 avatar Jun 30 '23 06:06 xuwei152

same for me, however, for me, it is always exactly two codeium processes running: Pasted image 2023-08-08 at 19 21 32@2x

neovim 0.9.1 (homebrew)
neovide 0.11.0 (homebrew)
macOS 13.4.1 (M1)

chrisgrieser avatar Aug 08 '23 17:08 chrisgrieser

@chrisgrieser there will always be exactly 2 processes actually; one is the child process of the other.

fortenforge avatar Aug 08 '23 18:08 fortenforge

I encountered the same problem. I just installed codeium today. I am using neovim. What configuration should I do to limit the number of processes?

renjinxi avatar Mar 11 '24 09:03 renjinxi