Replit console error <--- Last few GCs ---> and <--- JS stacktrace --->

Replit console error <--- Last few GCs ---> and <--- JS stacktrace --->

所以我正在使用我的机器人,但由于它没有响应,我决定检查它为什么离线。我打开我的代码,我在控制台中发现了这个错误。我只是想知道这意味着什么。这里:

<--- Last few GCs --->

[880:0x4b70e20] 26014144 ms: Mark-sweep 234.2 (257.5) -> 234.2 (257.8) MB, 2824.5 / 0.0 ms  (average mu = 0.148, current mu = 0.008) allocation failure scavenge might not succeed
[880:0x4b70e20] 26017038 ms: Mark-sweep 234.6 (257.8) -> 234.5 (257.8) MB, 2888.0 / 0.0 ms  (average mu = 0.081, current mu = 0.002) allocation failure scavenge might not succeed


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x1f02f9e808d1 <JSObject>
    0: builtin exit frame: parse(this=0x1f02f9e9ee79 <Object map = 0x1cdd4fa03639>,0x15196d9c0119 <Very long string[8081560]>,0x1f02f9e9ee79 <Object map = 0x1cdd4fa03639>)

    1: onMessage [0x118b705220e9] [/home/runner/New-Neptune/node_modules/discord.js/src/client/websocket/WebSocketShard.js:~278] [pc=0x2bb58926f89e](this=0x3f8662a33761 <EventEmitter map = 0x2d550d1ce3a9>,0x1166c1f7f291 <Even...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0xa1a640 node::Abort() [node]
 2: 0xa1aa4c node::OnFatalError(char const*, char const*) [node]
 3: 0xb9a68e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xb9aa09 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xd57c85  [node]
 6: 0xd58316 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [node]
 7: 0xd64bd5 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]
 8: 0xd65a85 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 9: 0xd6853c v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
10: 0xd363dc v8::internal::Factory::NewRawOneByteString(int, v8::internal::AllocationType) [node]
11: 0xe4561b v8::internal::JsonParser<unsigned short>::MakeString(v8::internal::JsonString const&, v8::internal::Handle<v8::internal::String>) [node]
12: 0xe47e9e v8::internal::JsonParser<unsigned short>::ParseJsonValue() [node]
13: 0xe486af v8::internal::JsonParser<unsigned short>::ParseJson() [node]
14: 0xc4bc05 v8::internal::Builtin_JsonParse(int, unsigned long*, v8::internal::Isolate*) [node]
15: 0x140df99  [node]
 

JavaScript heap out of memory

运行 内存不足。

如果没有看到您的代码,就不可能具体说出原因,但是在堆栈中看到 Builtin_JsonParse 意味着它可能正在解析来自某处的大 JSON 响应。