vscode-intelephense icon indicating copy to clipboard operation
vscode-intelephense copied to clipboard

Increase max file limit from 262143

Open sheepwall opened this issue 6 years ago • 20 comments

I am using Symfony 4 with a few additional packages. This error is output on the "intelephense" output in VS Code, when loading tooltip for completions. If I reinstall the extension, it goes away for a while, but it always shows again eventually.

Is there a way to increase the "Maximum URI count" or should I restrict the available ones in a way I'm not doing perhaps?

Thanks.

[Error - 10:14:55 AM] Error: Maximum URI count of 131071 exceeded.
    at Object.e.nextId (/home/user/.vscode/extensions/bmewburn.vscode-intelephense-client-1.2.2/node_modules/intelephense/lib/intelephense.js:72:89848)
    at o.add (/home/user/.vscode/extensions/bmewburn.vscode-intelephense-client-1.2.2/node_modules/intelephense/lib/intelephense.js:72:90216)
    at t.DocumentStore.add (/home/user/.vscode/extensions/bmewburn.vscode-intelephense-client-1.2.2/node_modules/intelephense/lib/intelephense.js:72:89134)
    at T.<anonymous> (/home/user/.vscode/extensions/bmewburn.vscode-intelephense-client-1.2.2/node_modules/intelephense/lib/intelephense.js:72:521088)
    at Generator.next (<anonymous>)
    at o (/home/user/.vscode/extensions/bmewburn.vscode-intelephense-client-1.2.2/node_modules/intelephense/lib/intelephense.js:72:516476)
[Error - 10:14:55 AM] Request completionItem/resolve failed.
  Message: Request completionItem/resolve failed with message: Maximum URI count of 131071 exceeded.
  Code: -32603 

sheepwall avatar Sep 04 '19 08:09 sheepwall

I'll look at increasing this limit. Do you have that many files in the workspace? Could be that the extension is leaking ids somewhere.

bmewburn avatar Sep 05 '19 22:09 bmewburn

Counting vendor tests and cache and everything, it amounts to a bit. But I don't quite understand, is each URI related to one project file? In that case it's something else, I don't have that many files.

sheepwall avatar Sep 06 '19 07:09 sheepwall

+1 (I have quite a few files in my workspace). Is this something that could be parameterized?

salemhilal avatar Sep 27 '19 18:09 salemhilal

Hello @bmewburn! I just got this error as well! Is there any workaround? It keeps trying to index and all resources consumption get higher and higher!

sjunior-dev avatar Oct 31 '19 14:10 sjunior-dev

Having this error as well 😞 indexing never finishes which is quite problematic. Workaround would be nice.

acautin avatar Nov 07 '19 11:11 acautin

The same problem, even with paid version. It's annoying enough. Extension cannot be used at this time

art-3d avatar Nov 12 '19 12:11 art-3d

Any news on this issue ? Can we help ?

tlenclos avatar Dec 30 '19 11:12 tlenclos

I can't provide any new insights into this, I don't know what I did to get rid of it, but it went away for me and now I'm on a new setup. Someone experiencing the bug currently would have to help fix it I guess.

EDIT: Not sure I should close considering the "+1" comments here?

sheepwall avatar Dec 30 '19 11:12 sheepwall

Anyone use the local history extension? https://marketplace.visualstudio.com/items?itemName=xyz.local-history ? If so is the .history dir being excluded or stored outside of the workspace?

How many files are in the workspace when this error is occurring?

bmewburn avatar Jan 26 '20 22:01 bmewburn

I'm also experiencing this issue on 1.6.3. As for number of files, it's 387764 for me. Btw, indeed this has to do somthing with number of files, because if I open a project with fewer files indexing is finished without any issues.

dawidnawrot avatar Mar 22 '21 09:03 dawidnawrot

I've the same issue, here is my vs code version info

Version: 1.55.2
Commit: 3c4e3df9e89829dce27b7b5c24508306b151f30d
Date: 2021-04-13T09:36:32.643Z (1 wk ago)
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Darwin x64 19.6.0

vs code output

[Error - 3:20:57 PM] Error: Maximum URI count of 131071 exceeded.
    at Object.e.nextId (/Users/aris/.vscode/extensions/bmewburn.vscode-intelephense-client-1.6.3/node_modules/intelephense/lib/intelephense.js:2:2228596)
    at o.add (/Users/aris/.vscode/extensions/bmewburn.vscode-intelephense-client-1.6.3/node_modules/intelephense/lib/intelephense.js:2:2229091)
    at t.DocumentStore.add (/Users/aris/.vscode/extensions/bmewburn.vscode-intelephense-client-1.6.3/node_modules/intelephense/lib/intelephense.js:2:2227882)
    at S.open (/Users/aris/.vscode/extensions/bmewburn.vscode-intelephense-client-1.6.3/node_modules/intelephense/lib/intelephense.js:2:1679673)
    at t.Intelephense.openDocument (/Users/aris/.vscode/extensions/bmewburn.vscode-intelephense-client-1.6.3/node_modules/intelephense/lib/intelephense.js:2:1884744)
    at /Users/aris/.vscode/extensions/bmewburn.vscode-intelephense-client-1.6.3/node_modules/intelephense/lib/intelephense.js:2:2160172
    at /Users/aris/.vscode/extensions/bmewburn.vscode-intelephense-client-1.6.3/node_modules/intelephense/lib/intelephense.js:2:6323996
    at /Users/aris/.vscode/extensions/bmewburn.vscode-intelephense-client-1.6.3/node_modules/intelephense/lib/intelephense.js:2:6324214
    at Immediate._onImmediate (/Users/aris/.vscode/extensions/bmewburn.vscode-intelephense-client-1.6.3/node_modules/intelephense/lib/intelephense.js:2:6325776)
    at processImmediate (internal/timers.js:456:21)

I've 24 root directories on my workspace, all of them is laravel/lumen project

arispati avatar Apr 21 '21 08:04 arispati

@arispati do you really need a workspace with 24 projects open? Why not just open the project you are working on at the time?

bmewburn avatar Apr 23 '21 09:04 bmewburn

I'm seeing this same error, and I just have a single project open.

nickbasham avatar Apr 23 '21 17:04 nickbasham

@nickbasham is there any further info you can share about this project? Does it have over 131071 files in it? Does it have symbolic links to other large projects? Or are you using some history tracking extension?

I'm looking at ways to increase the limit but there is always going to be a hard limit. If users are opening a folder/workspace containing every php file on their local disk that they have ever worked on it's not going to give the best experience.

bmewburn avatar Apr 23 '21 21:04 bmewburn

@bmewburn It actually happens in several of my projects. They're all fairly simple PHP projects in single-folder workspaces, using either Wordpress or Laravel, and easily have fewer than a couple hundred files besides the vendor and node_modules directories.

Happy to provide logs or other debugging info if it would help.

nickbasham avatar Apr 24 '21 12:04 nickbasham

@arispati do you really need a workspace with 24 projects open? Why not just open the project you are working on at the time?

@bmewburn Unfortunately all of those are services from one project. It makes me often to open other services while working on that project.

I will try to reduce the number of services in one workspace for now.

arispati avatar Apr 27 '21 03:04 arispati

Bumped to 262143 in 1.7.1

bmewburn avatar May 01 '21 07:05 bmewburn

@bmewburn Please Increment this value to 1048576

CyberAlby avatar Sep 20 '21 18:09 CyberAlby

Same issue here with Intelephense 1.9.5. The problem is that it crashes the server and eats a lot of CPU.

As a quick workaround I just created a new workspace with less projects but it doesn't really suit me.

vlec-be avatar Jul 17 '23 12:07 vlec-be

I get the same error, but I only have around 75,000 php files in my repo (magento tends to have a lot of files), so there should be plenty of marigin. But there are a total of 180k files if we don't just count php, so maybe that's the issue?

[Error - 11:36:12 AM] MaxUriCountError: Maximum URI count of 262143 exceeded.
    at e.nextId (/home/anka/.vscode/extensions/bmewburn.vscode-intelephense-client-1.14.4/node_modules/intelephense/lib/intelephense.js:2:3270913)
    at u.add (/home/anka/.vscode/extensions/bmewburn.vscode-intelephense-client-1.14.4/node_modules/intelephense/lib/intelephense.js:2:3271421)
    at t.DocumentStore.add (/home/anka/.vscode/extensions/bmewburn.vscode-intelephense-client-1.14.4/node_modules/intelephense/lib/intelephense.js:2:3270199)
    at v.open (/home/anka/.vscode/extensions/bmewburn.vscode-intelephense-client-1.14.4/node_modules/intelephense/lib/intelephense.js:2:2481476)
    at t.Intelephense.openDocument (/home/anka/.vscode/extensions/bmewburn.vscode-intelephense-client-1.14.4/node_modules/intelephense/lib/intelephense.js:2:2829769)
    at /home/anka/.vscode/extensions/bmewburn.vscode-intelephense-client-1.14.4/node_modules/intelephense/lib/intelephense.js:2:3189943
    at /home/anka/.vscode/extensions/bmewburn.vscode-intelephense-client-1.14.4/node_modules/intelephense/lib/intelephense.js:7:3766303
    at re (/home/anka/.vscode/extensions/bmewburn.vscode-intelephense-client-1.14.4/node_modules/intelephense/lib/intelephense.js:7:3766525)
    at /home/anka/.vscode/extensions/bmewburn.vscode-intelephense-client-1.14.4/node_modules/intelephense/lib/intelephense.js:7:3762465
    at Immediate._onImmediate (/home/anka/.vscode/extensions/bmewburn.vscode-intelephense-client-1.14.4/node_modules/intelephense/lib/intelephense.js:7:3762485)

anka-213 avatar May 19 '25 09:05 anka-213