-
Notifications
You must be signed in to change notification settings - Fork 247
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
Increase heap memory for jsii engine #745
Comments
I don't think we can host this setting in Ability to customize the |
Note that in the meantime, you can pass additional arguments to the # Sets the maximum heap to 4GiB
NODE_OPTIONS='--max-old-space-size=4096' |
Does If the system |
@RomainMuller the |
Ah - an alternate way to solve this until we actually support acting on those settings via configuration is to create a wrapper around #!/bin/bash
/usr/local/bin/node --stack_size=4096 $@ |
We recently encountered this as well in the CDK for Terraform when generating provider bindings for the AWS Terraform Provider for Go. Here is a small example which can be used to reproduce the issue or to do some profiling. Do you have any pointers where one might start digging, @RomainMuller? We're experiencing this particularly with Go (to this 7 GB extent 🏋️😄) |
This issue has not received any attention in 2 years. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
🚀 Feature Request
When using JSII for small AWS CDK applications, the JSII kernel will normally not run out of heap memory. However, for larger apps (>800 resources, multiple stacks), depending on the complexity, you can encounter the following error:
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
.Is there already a way to increase the Javascript heap memory beyond the default value?
Affected Languages
TypeScript
orJavascript
Python
Java
C#
,F#
, ...)General Information
Description
Add a setting in the
cdk.json
file which specifies the maximum allowed heap memory thatjsii
can allocate. Set the maximum heap memory then to this setting.Proposed Solution
The text was updated successfully, but these errors were encountered: