AWS CDK - Как исправить ошибку «Oatal process OOM в памяти недостаточно для создания изоляции»? - PullRequest
1 голос
/ 12 февраля 2020

Я пытаюсь работать с некоторыми примерами с AWS CDK, используя C# в качестве языка. Моя платформа Windows 10. Edit : я забыл упомянуть, я использую 64-битную Windows 10 и у меня 16 ГБ оперативной памяти.

У меня есть следуйте инструкциям по началу работы: Начало работы с AWS CDK , включая проверку наличия всех необходимых условий.

Я могу создать проект очень хорошо, но когда я пытаюсь используйте synth или deploy, он получает следующее:

Unhandled exception. Amazon.JSII.Runtime.JsiiException: Child process exited unexpectedly:
#
# Fatal process OOM in insufficient memory to create an Isolate
#


   at Amazon.JSII.Runtime.Services.Runtime.ReadResponse()
   at Amazon.JSII.Runtime.Services.Client.ReceiveResponse[TResponse]()
   at Amazon.JSII.Runtime.Services.Client.Hello()
   at Amazon.JSII.Runtime.Services.ServiceContainer.BuildServiceProvider(ILoggerFactory loggerFactoryOverride)
   at Amazon.JSII.Runtime.Services.ServiceContainer.<>c.<.cctor>b__8_0()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.get_Value()
   at Amazon.JSII.Runtime.Services.ServiceContainer.get_ServiceProvider()
   at Amazon.JSII.Runtime.Deputy.JsiiTypeAttributeBase.Load(Assembly assembly)
   at Amazon.JSII.Runtime.Deputy.JsiiTypeAttributeBase.Load(Assembly assembly)
   at Amazon.JSII.Runtime.Deputy.JsiiTypeAttributeBase..ctor(Type nativeType, String fullyQualifiedName)
   at Amazon.JSII.Runtime.Deputy.JsiiClassAttribute..ctor(Type nativeType, String fullyQualifiedName, String parametersJson)
   at System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, RuntimeType type, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs)
   at System.Reflection.CustomAttribute.CreateCaObject(RuntimeModule module, RuntimeType type, IRuntimeMethodInfo ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs)
   at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder`1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1 derivedAttributes)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)
   at System.RuntimeType.GetCustomAttributes(Type attributeType, Boolean inherit)
   at System.Attribute.GetCustomAttributes(MemberInfo element, Type type, Boolean inherit)
   at System.Attribute.GetCustomAttribute(MemberInfo element, Type attributeType, Boolean inherit)
   at System.Reflection.CustomAttributeExtensions.GetCustomAttribute[T](MemberInfo element)
   at Amazon.JSII.Runtime.ReflectionUtils.GetClassAttribute(Type type)
   at Amazon.JSII.Runtime.Deputy.DeputyBase..ctor(DeputyProps props)
   at Amazon.CDK.Construct..ctor(DeputyProps props)
   at Amazon.CDK.App..ctor(IAppProps props)
   at CdkHello.Program.Main(String[] args) in C:\VSTS\Sandbox\Hampson\cdk-hello\src\CdkHello\Program.cs:line 12
Subprocess exited with error 3762504530

Program.cs, строка 12 является сгенерированной строкой, неизменной по сравнению с ее первоначальной формой.

Я неоднократно искал эту ошибку, и все результаты поиска указывают на node.js. Но ни одно из решений (все включающие некоторую форму установки max-old-space-size) не помогает мне это понять. Насколько я могу судить, все мои установки Node и JS, а также установка CDK обновлены.

Я могу неоднократно дублировать это, создав новый проект, затем попытавшись запустить синтезатор или разверните на нем:

cdk init app --language csharp
cdk synth

Я боролся с этим в течение нескольких дней, и у меня больше нет идей. Любые предложения приветствуются.

...