bmewburn / vscode-intelephense

PHP intellisense for Visual Studio Code
https://intelephense.com
Other
1.61k stars 94 forks source link

1.10.3/4 seems to be always indexing and high CPU load (follow up on #2827) #2831

Closed timmit-nl closed 3 months ago

timmit-nl commented 6 months ago

Describe the bug Since the update today, to 1.10.3 (and 1.10.4), I keep seeing "intelephense 1.10.3(or 4) indexing ..." in the status bar, non-stop. Also the process is high in CPU and is slowing down everything.

Notes:

We have in total 12789 .php files that are indexed (I think because of the output of: find . -type f|grep "\.php"|wc -l)

Our config is:

    "intelephense.completion.maxItems": 5,
    "intelephense.files.exclude": [
        "**/.git/**",
        "**/.svn/**",
        "**/.hg/**",
        "**/CVS/**",
        "**/.DS_Store/**",
        "**/node_modules/**",
        "**/bower_components/**",
        "**/.gitlab/**",
        "**/.vscode/**",
        "**/public/download/**",
        "**/error/**",
        "**/public/default/**"
    ],
    "intelephense.maxMemory": 256,
    "intelephense.rename.exclude": [
        "**/download/**",
        "**/error/**"
    ],
    "intelephense.environment.includePaths": [
        "**/vendor/gull/**",
        "**/vendor/timmit/**",
        "**/app/**",
        "**/src/**"
    ],

Expected behavior None of above

Screenshots See issue #2827

Platform and version 1.10.3/1.10.4 on windows 10/linux mint/MacOS and Cloudlinux 7/8 (trough remote ssh)

harrybawsac commented 6 months ago

I have the same thing going on and eventually gives this error:

image

Already uninstalled and re-installed the plugin.

Also happens when downgrading to 1.10.2 for example.

timmit-nl commented 6 months ago

Ok I maybe found an issue:

It looks like 1.10.4(and .3) has 2x the memory usage as 1.10.2.

I have increased:

"intelephense.maxMemory": 256,

to

"intelephense.maxMemory": 512,

and now it is finishing and the load has dropped. I am still investigating with other projects if this is the magic config var for this problem.

harrybawsac commented 6 months ago

Sadly even upgrading this number to 2048 did nothing for me.

bmewburn commented 6 months ago

@harrybawsac are you using typo3? If so there's a known issue. Other things to check are if there are symbolic links causing excessive files to be indexed.

harrybawsac commented 6 months ago

@harrybawsac are you using typo3? If so there's a known issue. Other things to check are if there are symbolic links causing excessive files to be indexed.

I'm not using typo3.

I'll check for these symbolic links, but how?

joostdebruijn commented 5 months ago

I'm experiencing the same problem. After a rollback to 1.10.2 everything is working fine again. Is there something I can provide for troubleshooting? Running VS Code on Windows 11 connected with a remote running Ubuntu 22.04.

bmewburn commented 3 months ago

Please try the 1.11 pre-release to see if it fixes this issue. I'm closing this as it appears the original post was solved by increasing the available memory via intelephense.maxMemory

joostdebruijn commented 3 months ago

I'm running 1.11.4 and it works well. Thanks! :)