-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory hog #937
Comments
I'm sorry you're experiencing this @ohmer. To confirm, your Extensions Pane looks something like below? Replace the |
Hey @jpogran, thanks for looking at this report! Yes, this is what my setup looks like |
Hi @ohmer We publish some expectations around memory usage based on our benchmarks where the baseline is basically 300MB (
This is useful to know, but number of directories on its own should not cause this. The question is how many directories of these 224 are actually indexed, how big are these modules and what providers do they use. A few more questions:
Regarding (4) and (5) - you can provide these as gists or email them to us ( I understand it's a lot to ask ^, but getting even a few questions answered from the list would still help, getting them all answered would help enourmously.
|
Hi @radeksimko, Thanks a lot for looking into this! On your questions:
3.1
3.2
4 + 5. Sent via email. VSCode configuration applied before restarting extension:
I will leave these settings as is, hoping that a memory hog will happen again and it would provide more data. Thanks again for looking into this and please don't hesitate to ask for more info if that helps. That's how this could be tracked down. |
@ohmer This data is all useful, thank you for providing it!
I briefly looked into the one you sent but I didn't see anything out of ordinary - or it appeared to have been captured quite early in the LS lifecycle before most of any memory-heavy operations had chance to fill up the memory. It would be indeed more helpful to have one from when the memory usage is high. From the names of file paths it appears the vast majority of modules use the AWS provider primarily. That is the provider with biggest schema, and I guess that obtaining the schema (running I mentioned that in my email response, but I'll mention it again here, just for visibility. It looks like the logs you provided are logs for Terraform CLI execution (typically used to obtain the schema or get Terraform version, or to format code), not for the server itself. I have updated our troubleshooting docs - hopefully the difference between the two is now clearer.
|
@radeksimko since I sent this data and received your feedback, I upgraded the VSCode extension and configuration. Now running
I haven't had a memory hog since last report. If that happens in this new version + configuration, I will share hopefully more valuable data. |
I'm going to (optimistically) close this issue as there's nothing we can act on at this point. However, please do let us know if the issue re-appears by opening a new one and attaching the details as discussed - we'd be happy to look into it. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Server Version
Terraform Version
Client Version
Terraform Configuration Files
Can't do but don't think it is relevant.
Point to note is that I am using git and and symbolic links inside my repository.
Log Output
There are log outputs that I can see. The behavior is a memory hog, crashing or freezing my work machine for long minutes.
Expected Behavior
No machine crash or freeze.
Actual Behavior
In my setup
terraform-ls
runs on an AWS instance. I use VScode remote from my MacOS workstation to a EC2 Linux instance in AWS. The is because I work in a country far away from my cloud resource, that is ~150 - 200ms making terraform runs very slow). The EC2 instance is a t3a.medium (4GB of RAM).A
terraform plan
while having VScode running leads toterraform-ls
consuming lots of memory, leading to swap.Sometime crashing my instance (have to force reboot in the console) or making it unresponsive for 5-10 minutes.
Note that we are using a single terraform repository (
tree -d
=> 224 directories),terraform-ls
has lots to inspect.I managed to run
top
while the instance is still responsive and it shows the memory hog:Not shown on the picture but kswapd is also very busy, shell is unresponsive, can't start a new SSH connection, VSCode remote stalls...
Other environment information,
terraform-ls
runs on:Steps to Reproduce
I am not sure it can be reproduced. It might be related to the size of our repository.
There are no other DevOps in my organization who could clone our private repository.
But, if this is not related to the size of the repository, I guess a similar setup to mine could work.
Happy to provide an EC2 instance to do so.
The text was updated successfully, but these errors were encountered: