Skip to content

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

@Feli87

Description

@Feli87

Confirm this is a Node library issue and not an underlying OpenAI API issue

  • This is an issue with the Node library

Describe the bug

When updating to the latest SDK version 6.0.2 the application stopped compiling, complex types of 12gb to compile. ???

To Reproduce

...

Code snippets

71.1 
171.1 <--- Last few GCs --->
171.1 
171.1 [20:0x2ffa5000]   167081 ms: Mark-Compact 4039.8 (4128.1) -> 4024.0 (4128.6) MB, pooled: 3 MB, 2758.43 / 0.00 ms  (average mu = 0.133, current mu = 0.086) allocation failure; scavenge might not succeed
171.1 [20:0x2ffa5000]   170489 ms: Mark-Compact 4040.1 (4128.6) -> 4024.6 (4129.1) MB, pooled: 2 MB, 3377.93 / 0.00 ms  (average mu = 0.070, current mu = 0.009) allocation failure; scavenge might not succeed
171.1 
171.1 
171.1 <--- JS stacktrace --->
171.1 
171.1 FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
171.1 ----- Native stack trace -----
171.1 
171.1  1: 0xe16044 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [node]
171.1  2: 0x11e0dd0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
171.1  3: 0x11e10a7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
171.1  4: 0x140e985  [node]
171.1  5: 0x140e9b3  [node]
171.1  6: 0x1427a8a  [node]
171.1  7: 0x142ac58  [node]
171.1  8: 0x1c90921  [node]
172.2 Aborted (core dumped)
------
failed to solve: process "/bin/sh -c NODE_OPTIONS=\"--max-old-space-size=4096\" npm run build" did not complete successfully: exit code: 134

OS

Linux

Node version

v22.5.1

Library version

openai 6.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions