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

JavaScript heap out of memory #443

Open
maradney opened this issue Mar 3, 2024 · 1 comment
Open

JavaScript heap out of memory #443

maradney opened this issue Mar 3, 2024 · 1 comment
Labels
question Further information is requested

Comments

@maradney
Copy link

maradney commented Mar 3, 2024

Describe the Bug
I've had this issue on multiple servers with different providers where I can't generate on server due to memory issue.
I've solved this before by copying generated files from node_modules on my machine to the repo and pushing it. but this is not a solution.

To Reproduce
Get a vps server and try to deploy.
Mine is this from hostinger. also had similar results with AWS.

Screenshot 2024-03-03 at 7 31 14 PM

Expected Behavior
To run prisma-generate without issues.

Logs

Generator "typegraphql-prisma" failed:

<--- Last few GCs --->
[2732:0x7111870]    96935 ms: Mark-sweep (reduce) 2036.3 (2083.2) -> 2035.5 (2083.4) MB, 1798.3 / 0.0 ms  (average mu = 0.143, current mu = 0.013) allocation failure; scavenge might not succeed
[2732:0x7111870]    98775 ms: Mark-sweep (reduce) 2036.5 (2083.4) -> 2035.7 (2083.7) MB, 1806.6 / 0.0 ms  (average mu = 0.083, current mu = 0.018) allocation failure; scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0xb87bc0 node::Abort() [node]
 2: 0xa96834  [node]
 3: 0xd687f0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xd68b97 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xf462a5  [node]
 6: 0xf471a8 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [node]
 7: 0xf576b3  [node]
 8: 0xf58528 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 9: 0xf32e8e v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
10: 0xf34257 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
11: 0xf1542a v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
12: 0x12da78f v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
13: 0x170a079  [node]
Aborted (core dumped)

Environment (please complete the following information):

  • OS: Ubuntu 23.04 64bit
  • Node: 18.18.9
  • typegraphql-prisma: "^0.27.0"
  • Prisma version: "~5.0.0"
  • TypeScript version: "4.9.5"
@MichalLytek
Copy link
Owner

Please generate the code as a source code, so then you can bundle it and ship ready to use js code, without generating it on server.

@MichalLytek MichalLytek added the question Further information is requested label Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants