Skip to content

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory #37150

Description

@Fizayy

Hello, i have this problem but my node version is : 14.15.4
This problem should not normally occur

<--- Last few GCs --->
[23457:0x568bf10]   127523 ms: Mark-sweep (reduce) 4090.3 (4101.2) -> 4088.2 (4102.0) MB, 2275.2 / 0.0 ms  (average mu = 0.158, current mu = 0.096) allocation failure scavenge might not succeed
[23457:0x568bf10]   129893 ms: Mark-sweep (reduce) 4089.3 (4101.0) -> 4088.2 (4102.0) MB, 2364.1 / 0.0 ms  (average mu = 0.085, current mu = 0.002) allocation failure scavenge might not succeed
| <--- JS stacktrace --->
| FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
|  1: 0xa04200 node::Abort() [/usr/bin/node]
|  2: 0x94e4e9 node::FatalError(char const*, char const*) [/usr/bin/node]
|  3: 0xb797be v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/bin/node]
|  4: 0xb79b37 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/bin/node]
|  5: 0xd343c5  [/usr/bin/node]
|  6: 0xd34f4f  [/usr/bin/node]
|  7: 0xd42fdb v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/bin/node]
|  8: 0xd46b9c v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/bin/node]
|  9: 0xd1527b v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/usr/bin/node]
| 10: 0x105b21f v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/usr/bin/node]
| 11: 0x14011f9  [/usr/bin/node]

Activity

  1. added
    memoryIssues and PRs related to Node.js memory management or memory footprint.
    on Jan 31, 2021
  2. targos commented on Jan 31, 2021

    @targos
    Member

    This error means that the V8 engine ran out of memory. It can happen because of a memory leak or too many allocations in your code, or because of a bug in V8 or Node.js.
    Please give us a way to reproduce, otherwise we won't be able to help.

  3. kerosan commented on Feb 17, 2021

    @kerosan

    same problem

    failed when create-react-app recompile by webpack-dev-server

  4. parthibd commented on Aug 23, 2021

    @parthibd

    I am unable to resolve this problem whatever I do . I am stuck !

  5. mhdawson commented on Aug 26, 2021

    @mhdawson
    Member

    As @targos mentioned unless there is a way to reproduce we won't be able to help.

  6. parthibd commented on Aug 27, 2021

    @parthibd

    Vue cli was using the preetier plugin which was causing exponential growth in terms of memory. Disabled that bugger and it fixed my problem. Nodejs tracing helped! 😁

  7. LoganMcnulty commented on Sep 16, 2021

    @LoganMcnulty

    I am having the exact same issue on Heroku after implementing front-end updates. One of the updates required me to upgrade npm, so i began specifying npm and node for heroku to use.

    At first the app would try to run and crash with a memory spike issue, now it is crashing with the above error.

    I have rolled back all updates, everything runs perfectly smooth locally, and I have confirmed in dev tools that there are no memory leaks whatsoever.

    It's difficult to tell how to reproduce without installing our apps.

  8. kenorb commented on Sep 10, 2022

    @kenorb

    Same error with Next.js, see: vercel/next.js#40216

  9. bnoordhuis commented on Sep 11, 2022

    @bnoordhuis
    Member

    ^ that's simply exhausting memory, not a node bug.

    I'm going to close this, there isn't anything actionable for us.

  10. thaisrdev commented on Mar 1, 2023

    @thaisrdev

    Vue cli was using the preetier plugin which was causing exponential growth in terms of memory. Disabled that bugger and it fixed my problem. Nodejs tracing helped! grin

    THANK YOU!!! THAT FIXED MY PROBLEM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    memoryIssues and PRs related to Node.js memory management or memory footprint.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions