renderinc/fetch-node-version

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

Opened this issue · 0 comments

I'm deploying my nest.js backend and after the build is completed then, during the deployment it fails and giving this error:

==> Checking out commit 7c98b48ed91b3df9f7f93bbffc59d6e37395b589 in branch main
==> Using Node version 20.15.1 (default)
==> Docs on specifying a Node version: https://render.com/docs/node-version
==> Using Bun version 1.1.0 (default)
==> Docs on specifying a bun version: https://render.com/docs/bun-version
==> Running build command 'yarn install'...
yarn install v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
warning @puppeteer/browsers@0.5.0: Invalid bin entry for "@puppeteer/browsers" (in "@puppeteer/browsers").
[3/4] Linking dependencies...
warning " > @nestjs-modules/mailer@1.11.2" has unmet peer dependency "@types/ejs@>=3.0.3".
warning " > @nestjs-modules/mailer@1.11.2" has unmet peer dependency "@types/pug@>=2.0.6".
warning " > @nestjs-modules/mailer@1.11.2" has unmet peer dependency "ejs@>=3.1.2".
warning " > @nestjs-modules/mailer@1.11.2" has unmet peer dependency "pug@>=3.0.1".
warning "mongoose > mongodb > @aws-sdk/credential-providers > @aws-sdk/credential-provider-sso > @aws-sdk/token-providers@3.614.0" has unmet peer dependency "@aws-sdk/client-sso-oidc@^3.614.0".
warning " > soft-delete-plugin-mongoose@1.0.17" has incorrect peer dependency "mongoose@^7.6.1".
warning " > ts-loader@9.5.1" has unmet peer dependency "webpack@^5.0.0".
[4/4] Building fresh packages...
$ husky install
husky - Git hooks installed
Done in 51.81s.
==> Uploading build...
==> Deploying...
==> Build uploaded in 8s
==> Build successful 🎉
==> Using Node version 20.15.1 (default)
==> Docs on specifying a Node version: https://render.com/docs/node-version
==> Using Bun version 1.1.0 (default)
==> Docs on specifying a bun version: https://render.com/docs/bun-version
==> Running 'yarn start'
yarn run v1.22.22
$ nest start
==> No open ports detected, continuing to scan...
==> Docs on specifying a port: https://render.com/docs/web-services#port-binding
==> Exited with status 134
==> Common ways to troubleshoot your deploy: https://docs.render.com/troubleshooting-deploys
==> Using Node version 20.15.1 (default)
==> Docs on specifying a Node version: https://render.com/docs/node-version
==> Using Bun version 1.1.0 (default)
==> Docs on specifying a bun version: https://render.com/docs/bun-version
<--- Last few GCs --->
[100:0x7485710] 66001 ms: Mark-Compact 253.3 (259.0) -> 252.3 (259.0) MB, 2200.19 / 0.00 ms (average mu = 0.147, current mu = 0.044) allocation failure; scavenge might not succeed
[100:0x7485710] 68001 ms: Mark-Compact 253.4 (259.0) -> 252.6 (259.2) MB, 1996.54 / 0.00 ms (average mu = 0.080, current mu = 0.002) allocation failure; scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----
1: 0xb80c98 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/opt/render/project/nodes/node-20.15.1/bin/node]
2: 0xeede90 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/opt/render/project/nodes/node-20.15.1/bin/node]
3: 0xeee177 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/opt/render/project/nodes/node-20.15.1/bin/node]
4: 0x10ffd15 [/opt/render/project/nodes/node-20.15.1/bin/node]
5: 0x1117b98 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/opt/render/project/nodes/node-20.15.1/bin/node]
6: 0x10edcb1 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/opt/render/project/nodes/node-20.15.1/bin/node]
7: 0x10eee45 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/opt/render/project/nodes/node-20.15.1/bin/node]
8: 0x10cc496 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/opt/render/project/nodes/node-20.15.1/bin/node]
9: 0x15282c6 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/opt/render/project/nodes/node-20.15.1/bin/node]
10: 0x1961ef6 [/opt/render/project/nodes/node-20.15.1/bin/node]
Aborted (core dumped)
error Command failed with exit code 134.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.