Admin failed to compile, GC error

System Information
  • Strapi Version: 4.0.3
  • Operating System: Debian 10
  • Database: postgres
  • Node Version: v17.3.0
  • NPM Version: 8.3.0
  • Yarn Version: -

Hey guys! Trying to run Strapi on my Linode Server with nginx as proxy. So far it’s going well, but compiling the dashboard I am getting a strange error I’ve never run into before. Running npm run build, the Webpack bundling gets stuck at 92% process and after a while the build process failes.

I can understand it has something to do with the Garbage Collector, probably running out of resources or something?? Can anyone understand the following error message better to guide me in the right direction?

<--- Last few GCs --->

[15239:0x6408180]    95322 ms: Mark-sweep 474.4 (496.9) -> 470.6 (497.1) MB, 1289.7 / 0.1 ms  (average mu = 0.142, current mu = 0.038) allocation failure scavenge might not succeed
[15239:0x6408180]    96674 ms: Mark-sweep 474.7 (497.1) -> 470.9 (497.4) MB, 1284.4 / 0.1 ms  (average mu = 0.098, current mu = 0.050) allocation failure scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0xb2c2b0 node::Abort() [node]
2: 0xa4025c node::FatalError(char const*, char const*) [node]
3: 0xd1d11e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
4: 0xd1d497 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
5: 0xed68f5  [node]
6: 0xed73d6  [node]
7: 0xee704c  [node]
8: 0xee7ac0 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
9: 0xeeaa6e v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
10: 0xeac48a v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
11: 0x122c8e8 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
12: 0x162fb79  [node]
Aborted

Thanks!