Problem with JsReport and NestJS
I have a problem with jsreport, he's log this message in Observability, and restart my service.
<--- Last few GCs --->
[37:0x48c3a00] 854512 ms: Scavenge (reduce) 1755.5 (1926.3) -> 1754.5 (1930.1) MB, 14.6 / 0.0 ms (average mu = 0.992, current mu = 0.971) allocation failure;
[37:0x48c3a00] 856831 ms: Mark-sweep (reduce) 2251.8 (2426.8) -> 2251.2 (2396.1) MB, 404.7 / 0.0 ms (+ 74.0 ms in 556 steps since start of marking, biggest step 0.5 ms, walltime since start of marking 2697 ms) (average mu = 0.966, current mu = 0.895) e
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
1: 0xab4728 node::Abort() [node]
2: 0x9a4839 [node]
3: 0xcc23e0 v8::Utils::ReportOOMFailure(v8::internal::Isolate, char const, bool) [node]
4: 0xcc27ab v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate, char const, bool) [node]
5: 0xea6cc5 [node]
6: 0xebb109 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
7: 0xebdec4 v8::internal::Heap::AllocateExternalBackingStore(std::function<void* (unsigned long)> const&, unsigned long) [node]
8: 0xff8b6b v8::internal::BackingStore::Allocate(v8::internal::Isolate, unsigned long, v8::internal::SharedFlag, v8::internal::InitializedFlag) [node]
9: 0xcd737b v8::ArrayBuffer::NewBackingStore(v8::Isolate, unsigned long) [node]
10: 0xbb6a7a node::StreamBase::Writev(v8::FunctionCallbackInfo<v8::Value> const&) [node]
11: 0xbba3dd void node::StreamBase::JSMethod<&node::StreamBase::Writev>(v8::FunctionCallbackInfo<v8::Value> const&) [node]
12: 0xd251ee v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [node]
13: 0xd25811 [node]
14: 0xd26107 v8::internal::Builtin_HandleApiCall(int, unsigned long, v8::internal::Isolate) [node]
15: 0x16abef9 [node]
10 Replies
Project ID:
8140907c-d91e-4495-8289-d77c9283a314
8140907c-d91e-4495-8289-d77c9283a314
what do your memory metrics look like when you are shown this error?
normal, it's not event close to the max, my plan is 8gb ram, and the max he got is 4gb
try increasing the heap size
whats i do it?
pardon?
How i make this?
try setting a service variable
NODE_OPTIONS
to --max-old-space-size=8192
ok, i set this, thank you