marlonfan / coc-phpls

🐭 php language server for coc.nvim
MIT License
212 stars 16 forks source link

High cpu and memory usage on Ubuntu 20.04 #73

Open dassio opened 4 years ago

dassio commented 4 years ago

Describe the bug High CPU and Memory Usage

To Reproduce open any php file

Expected behavior low cpu and memory usage

Screenshots danny@xps:~$ pstree -a -p -s 773113

systemd,1 splash
  └─systemd,1733 --user
      └─gnome-terminal-,3920
          └─bash,772149
              └─vim,773097 test.php
                  └─node,773098 --no-warnings /home/danny/.vim/plugged/coc.nvim/build/index.js
                      └─node,773113 /home/danny/.config/coc/extensions/node_modules/coc-phpls/node_modules/intelephense/lib/intelephense.js --node-ipc --clientProcessId=773098
                          ├─{node},773114
                          ├─{node},773115
                          ├─{node},773116
                          ├─{node},773117
                          ├─{node},773118
                          ├─{node},773119
                          ├─{node},773120
                          ├─{node},773121
                          ├─{node},773122
                          └─{node},773123
danny@xps:~$ ps -p 773113 -o %cpu,%mem,cmd
%CPU %MEM CMD
 174  9.0 /usr/bin/node /home/danny/.config/coc/extensions/node_modules/coc-phpls/node_modules/intelephense/lib/intelephense.js --node-ipc --clientProcessId=773098

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

artfulrobot commented 3 years ago

I get this problem - it can completely lock up my system until (I think) the OOM kills node. I don't know why it gets in a knot sometimes and not others.

I'm on Debian 10. nvim version: NVIM v0.4.3
node version: v10.16.0
coc.nvim version: 0.0.71-a1e2f4afac

qiao-summer commented 3 years ago

I have this problem too, reason is coc-phpls extensions,But I don't know how to solve it.

artfulrobot commented 3 years ago

Yes I've had to disable/uninstall coc-phpls on some servers.

twouters commented 3 years ago

This happens when I open a PHP file in my homedir though coc reports the following when opening the file:

[coc.nvim] Ignored rootPath /home/twouters of client "languageserver.intelephense"

With strace I could clearly see the plugin scanning my whole home directroy.

ArsenalNox commented 3 years ago

Got this problem twice on two different arch linux installations. This problem always occurs then I run nvim and edit file from any other directory besides file root directory and never if directly in it.

Neovim v0.4.4 node.js v15.14.0 Coc.nvim 0.0.80-2dbe0ae611 Coc-phpls 2.2.0

bellaichef commented 2 years ago

Hi,

I have a similare issue on Ubuntu 16.04 with VIM 8, Coc-phpls. Anybody has a tip for this, it can stuck the whole server.

My config :

rosmanov commented 2 years ago

I see an extremely high memory usage when I open two instances of NeoVim in different projects:

  1. a huge PHP project
  2. a Go project with some PHP files.

The problem occurs when I:

Memory usage grows endlessly until I kill the nvim processes. I'm not sure if it's 100% reproducible though.

There is definitely a leak somewhere, but I haven't had the time to collect the information necessary for a bug report. But here is some information about my setup: