-
Notifications
You must be signed in to change notification settings - Fork 457
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
Generating azurerm provider for go exceeds 'hard' memory limit #1264
Comments
Hi @waxb! I fear that this is something we should fix upstream in JSII as we're now approaching memory requirements that I'd rather not want to require from users. Fixing the root cause here sounds more reasonable to me. |
Just a guess (to be confirmed): The memory usage could be a side effect of aws/jsii#3091 |
Could not confirm this – it still failed with an OOM error after commenting out that cpu heavy code. |
I am getting the same error but with the provider The output is: |
I had a similar failure. The mistake I made was not actually making sure I actually had the memory available for node to use on my device. It ended up working when I closed everything I could that was taking up memory and ran the command again. |
Thanks for the quick reply. I did make sure that I had sufficient RAM available and still facing the same issue. |
I didn't need to, but I did monitor my RAM usage to make sure that the setting did apply to me. I didn't have to do anything extra to make it work. |
@edmundloo do you get this message when it has started generating?
If not then you are still having the 10GB limit and from your crash output seems like this is the case. |
@waxb In your original post, it looks like your talked about setting the variable: not sure what the impact is, but from the documentation the right way is Also, from looking at the code the logic seems to prevent from using this. I am no node expert, but my understanding is that if we set |
@jcdan3 |
Thanks for the feedback. I was not able to succeed with This solved my issue. |
@waxb Agreed, I monitored my RAM and it was roughly 12.5 GB. |
@waxb Is this solved with 0.8 for you as well? |
@DanielMSchmidt |
👍 Great, then I'll close the issue for now |
+1 to prioritise the fix for go+azurerm, I didnt see any min specs in the docs and I have this 16GB Windows laptop By shutting down vscode I managed to "cdktf get" to complete but "cdktf synth" keeps bombing |
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. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Community Note
cdktf & Language Versions
Expected Behavior
Actual Behavior
https://gist.github.com/waxb/78ecff27cd265525e290043da7db6c71
cdktf get
fails as the azurerm provider generation is bigger than the default(
console.warn(found NODE_OPTIONS environment variable without a setting for --max-old-space-size. The provider generation needs a substantial amount of memory (~13GB) for some providers and languages. So cdktf-cli sets it to NODE_OPTIONS="--max-old-space-size=16384" by default. As your environment already contains a NODE_OPTIONS variable, we won't override it. Hence, the provider generation might fail with an out of memory error.);
)Important Factoids
workaround:
export NODE_OPTIONS=--max_old_space_size=16384
as azurerm takes ~13 GBs to generateThe workaround is only working if you are seeing the
...NODE_OPTIONS variable, we won't override it...
message as shown above.References
This seems to be the affecting line
I got the idea from here
The text was updated successfully, but these errors were encountered: