MichalLytek / MichalLytek/typegraphql-prisma
JavaScript heap out of memory
- Dominant language
- TypeScript
- Stars
- 918
- Forks
- 130
- PR merge metrics
- No merged PRs in 30d
Description
**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.
**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"
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing prisma-generate on Ubuntu with Node 18.18.9, typegraphql-prisma 0.27.0, Prisma 5.0.0, and TypeScript 4.9.5, using the deployment conditions described. Then identify which generator entry point or operation reaches the heap limit; done means generation completes without the reported JavaScript out-of-memory failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100