Skip to content
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

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

Open
ashu1230 opened this issue Jul 30, 2024 · 0 comments

Comments

@ashu1230
Copy link

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/[email protected]: Invalid bin entry for "@puppeteer/browsers" (in "@puppeteer/browsers").
[3/4] Linking dependencies...
warning " > @nestjs-modules/[email protected]" has unmet peer dependency "@types/ejs@>=3.0.3".
warning " > @nestjs-modules/[email protected]" has unmet peer dependency "@types/pug@>=2.0.6".
warning " > @nestjs-modules/[email protected]" has unmet peer dependency "ejs@>=3.1.2".
warning " > @nestjs-modules/[email protected]" has unmet peer dependency "pug@>=3.0.1".
warning "mongoose > mongodb > @aws-sdk/credential-providers > @aws-sdk/credential-provider-sso > @aws-sdk/[email protected]" has unmet peer dependency "@aws-sdk/client-sso-oidc@^3.614.0".
warning " > [email protected]" has incorrect peer dependency "mongoose@^7.6.1".
warning " > [email protected]" 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant