Open minht11 opened 2 years ago
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
More and more people seems to face performance issue when exporting. Sounds like it's time to optimise 😌 I'll dig into that
I ran into this one because I didn't know how deep I needed to export so I just picked the highest to see what came out.
I ran into this one because I didn't know how deep I needed to export so I just picked the highest to see what came out.
Same here.
@Baboo7 this issue is still present :)
Describe the bug Exporting while using JSON2 format (other formats work fine), with high deepness level, even with simple schemas runs out of memory and crashes.
To Reproduce Steps to reproduce the behavior:
Expected behavior Plugin doesn't crash Strapi.
Additional context If applicable, add screenshots to help explain your problem.
Schema used
{ "kind": "singleType", "collectionName": "texts", "info": { "singularName": "text", "pluralName": "texts", "displayName": "Text", "description": "" }, "options": { "draftAndPublish": false }, "pluginOptions": { "i18n": { "localized": true } }, "attributes": { "allUseCases": { "pluginOptions": { "i18n": { "localized": true } }, "type": "string" }, "orderNow": { "pluginOptions": { "i18n": { "localized": true } }, "type": "string" }, "registerNow": { "pluginOptions": { "i18n": { "localized": true } }, "type": "string" }, "allLocations": { "pluginOptions": { "i18n": { "localized": true } }, "type": "string" }, "learnMore": { "pluginOptions": { "i18n": { "localized": true } }, "type": "string" }, "buyNow": { "pluginOptions": { "i18n": { "localized": true } }, "type": "string" }, "From": { "pluginOptions": { "i18n": { "localized": true } }, "type": "string" } } }Terminal logs
[2022-11-09 16:43:29.237] http: GET api:api/admin/content-manager/singleType/api::text.text?plugins[i18n][locale]=en (24 ms) 200 [2022-11-09 16:43:29.608] http: GET /admin/project-type (12 ms) 200 [2022-11-09 16:43:29.692] http: POST /admin/renew-token (13 ms) 200 [2022-11-09 16:43:29.698] http: GET /admin/init (3 ms) 200 [2022-11-09 16:43:29.707] http: GET /admin/telemetry-properties (2 ms) 200 [2022-11-09 16:43:29.842] http: GET /admin/users/me/permissions (42 ms) 200 [2022-11-09 16:43:29.852] http: GET /admin/information (54 ms) 200 [2022-11-09 16:43:29.876] http: GET /admin/users/me (72 ms) 200 [2022-11-09 16:43:29.889] http: GET /i18n/locales (9 ms) 200 [2022-11-09 16:43:30.051] http: GET /content-manager/components (6 ms) 200 [2022-11-09 16:43:30.069] http: GET /content-manager/content-types (14 ms) 200 [2022-11-09 16:43:30.085] http: GET /content-manager/content-types-settings (9 ms) 200 [2022-11-09 16:43:30.112] http: GET /content-manager/content-types/api::text.text/configuration (9 ms) 200 [2022-11-09 16:43:30.152] http: GET /content-manager/single-types/api::text.text?locale=en (21 ms) 200 <--- Last few GCs ---> [44426:0x150048000] 92857 ms: Scavenge 2042.7 (2086.1) -> 2040.8 (2086.1) MB, 2.8 / 0.0 ms (average mu = 0.335, current mu = 0.270) allocation failure; [44426:0x150048000] 92863 ms: Scavenge 2042.8 (2086.1) -> 2040.8 (2086.1) MB, 4.4 / 0.0 ms (average mu = 0.335, current mu = 0.270) allocation failure; [44426:0x150048000] 92867 ms: Scavenge 2042.9 (2086.1) -> 2041.0 (2086.3) MB, 3.5 / 0.0 ms (average mu = 0.335, current mu = 0.270) allocation failure; <--- JS stacktrace ---> FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 1: 0x1024f7938 node::Abort() [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 2: 0x1024f7ac0 node::errors::TryCatchScope::~TryCatchScope() [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 3: 0x102649944 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 4: 0x1027f4498 v8::internal::EmbedderStackStateScope::EmbedderStackStateScope(v8::internal::Heap*, v8::internal::EmbedderStackStateScope::Origin, cppgc::EmbedderStackState) [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 5: 0x1027f80a0 v8::internal::Heap::CollectSharedGarbage(v8::internal::GarbageCollectionReason) [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 6: 0x1027f5094 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*, v8::GCCallbackFlags) [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 7: 0x1027f24ec v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 8: 0x1027e7224 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 9: 0x1027e7a54 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 10: 0x1027cd888 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 11: 0x102b5d904 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 12: 0x102ea902c Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 13: 0x102e3ab80 Builtins_KeyedStoreIC_Megamorphic [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 14: 0x107dc9288 15: 0x107b0bbf0 16: 0x107b12d24 17: 0x107b131e0 18: 0x107b131e0 19: 0x107b131e0 20: 0x107b131e0 21: 0x107b131e0 22: 0x107b131e0 23: 0x107b131e0 24: 0x107b131e0 25: 0x107b131e0 26: 0x107b131e0 27: 0x107b131e0 28: 0x107b131e0 29: 0x107b131e0 30: 0x107d9b7fc 31: 0x107d9b7fc 32: 0x102e34198 Builtins_InterpreterEntryTrampoline [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 33: 0x102e34198 Builtins_InterpreterEntryTrampoline [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 34: 0x102e34198 Builtins_InterpreterEntryTrampoline [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 35: 0x102e34198 Builtins_InterpreterEntryTrampoline [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 36: 0x102e34198 Builtins_InterpreterEntryTrampoline [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 37: 0x102e34198 Builtins_InterpreterEntryTrampoline [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 38: 0x107e51fd0 39: 0x107eb15b0 40: 0x107e51fd0 41: 0x107ed9108 42: 0x107e51fd0 43: 0x107eb858c 44: 0x102e65ef4 Builtins_AsyncFunctionAwaitResolveClosure [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 45: 0x102ef46d8 Builtins_PromiseFulfillReactionJob [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 46: 0x102e57c4c Builtins_RunMicrotasks [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 47: 0x102e323a4 Builtins_JSRunMicrotasksEntry [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 48: 0x102775d38 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 49: 0x102776228 v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/justas/.nvm/versions/node/v18.4.0/bin/node] 50: 0x102776404 v8::internal::Execution::TryRunMicrotasks(v8::internal::Isolate*, v8::internal::MicrotaskQueue*, v8::internal::MaybeHandle