Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
VSCode Remote Container with Intelephense causes resource starvation and node crashes #874
Describe the bug
I've tried allowing as much as 2GB RAM to Intelephense to let it do its thing, and wound up having to scale it back or it would choke the container.
Platform and version
I've made a slight change in 1.3.5. Unfortunately larger workspaces do use quite a bit of memory. In my 1.3.5 tests indexing magento 2 (30k files) takes up ~600MB after GC but spikes to ~1.2GB at times during indexing. I'll see if some improvements can be made here.
EDIT: I didn't see your most recent post until after posting this tome. I'll update to 1.3.6 and get back to you :-)
I updated to 1.3.5 and tried again. With the amount of allowed memory set to 1024MB I was still getting crash reports about it being out of memory. I increased it to 3096 (You mentioned 30k files for Magento 2 - when you move to the enterprise edition, it shoots up to 51k. Oof.) and that particular behavior went away. However, it's still binding up the procs. While idling, the load average on this particular docker instance hovers around 0.12. During the first couple of hours I was letting it index it was between 2 and 6 or so, and it was peaking near 18. Once the load average approaches 5 or so, the connection to the instance starts getting spotty. I let it run overnight, thinking that it would be done by the time I got back to it this morning, since it wasn't crashing anymore. No such luck, I'm afraid, When I got in this morning it was bound up with the load average being over 60.
I did notice that at times the number of instances of indexers was around 12 or so. Is there a way, perhaps, of limiting the number of indexers, so that while it will take longer to index, it won't bind up the instance? I'm attaching this screenshot just so you can see how the load averages are peaking.