webpack-dev-server: Frequent crashes with `Command failed with exit code 134.`

What is the current behavior?

After running for a few hours, webpack-server-dev is often crashing for me and my colleagues with the following error:

sh: line 1: 26853 Abort trap: 6           webpack-dev-server --hot --progress --history-api-fallback --config webpack/webpack.dev.config.js --content-base html/
error Command failed with exit code 134.

There is no other output and we haven’t yet been able to determine what’s causing it. it seems to be fairly random, but consistent.

Our project is about 3000-4000 modules large.

What is the expected behavior?

No crash. Or better error message explaining what the issue was.

Please mention your webpack and Operating System version.

Mac OSX 10.12.4

webpack: 2.5.1 webpack-dev-server: 2.4.5

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 11
  • Comments: 15 (3 by maintainers)

Most upvoted comments

<— Last few GCs —>

[21816:0000029E47DA1E20] 173246 ms: Mark-sweep (reduce) 2042.2 (2051.2) -> 2041.4 (2052.4) MB, 4042.1 / 1.2 ms (average mu = 0.067, current mu = 0.006) allocation failure scavenge might not succeed [21816:0000029E47DA1E20] 177915 ms: Mark-sweep (reduce) 2042.5 (2054.4) -> 2041.7 (2054.7) MB, 4592.0 / 1.2 ms (average mu = 0.040, current mu = 0.016) allocation failure scavenge might not succeed

<— JS stacktrace —>

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 1: 00007FF76084058F napi_wrap+109311 2: 00007FF7607E52B6 v8::internal::OrderedHashTablev8::internal::OrderedHashSet,1::NumberOfElementsOffset+33302 3: 00007FF7607E6086 node::OnFatalError+294 4: 00007FF7610B150E v8::Isolate::ReportExternalAllocationLimitReached+94 5: 00007FF76109638D v8::SharedArrayBuffer::Externalize+781 6: 00007FF760F4081C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1516 7: 00007FF760F4BB5A v8::internal::Heap::ProtectUnprotectedMemoryChunks+1258 8: 00007FF760F48D09 v8::internal::Heap::PageFlagsAreConsistent+2457 9: 00007FF760F3D931 v8::internal::Heap::CollectGarbage+2033 10: 00007FF760F3BB35 v8::internal::Heap::AllocateExternalBackingStore+1317 11: 00007FF760F55DD6 v8::internal::Factory::AllocateRaw+166 12: 00007FF760F697F4 v8::internal::FactoryBasev8::internal::Factory::NewFixedArrayWithFiller+84 13: 00007FF760F69745 v8::internal::FactoryBasev8::internal::Factory::NewFixedArray+69 14: 00007FF760E36112 v8::Object::GetIsolate+52802 15: 00007FF760E35472 v8::Object::GetIsolate+49570 16: 00007FF760DBA7B6 v8::internal::LayoutDescriptor::Trim+20038 17: 00007FF760DB6318 v8::internal::LayoutDescriptor::Trim+2472 18: 00007FF760DB9C18 v8::internal::LayoutDescriptor::Trim+17064 19: 00007FF760DB9898 v8::internal::LayoutDescriptor::Trim+16168 20: 00007FF760C9B8C3 v8::internal::interpreter::JumpTableTargetOffsets::iterator::operator=+65171 21: 00007FF760C9BC17 v8::internal::interpreter::JumpTableTargetOffsets::iterator::operator=+66023 22: 00007FF761139EBD v8::internal::SetupIsolateDelegate::SetupHeap+463949 23: 00000241E40F2CF8 error Command failed with exit code 134. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Can you give any more insight into what Command failed with exit code 134. means? I don’t know where to start to dig into this deeper.

I have the same error message when trying to use yarn so it probably is not related specifically to webpack.

Vedrans-Mac-mini:tensorflow.js-classifier vedrano$ yarn watch yarn run v1.12.1 $ cross-env NODE_ENV=development parcel index.html --no-hmr --open Server running at http://localhost:1234 ⠦ Building index-nonode.js… <— Last few GCs —> … /var/folders/dc/kt06jl4n17393wmd8xmqtcsr0000gn/T/yarn–1541874315534-0.04599513967422797/node: line 3: 4868 Abort trap: 6 “/usr/local/Cellar/node/11.1.0/bin/node” “$@” error Command failed with exit code 134.

<— Last few GCs —>

[21816:0000029E47DA1E20] 173246 ms: Mark-sweep (reduce) 2042.2 (2051.2) -> 2041.4 (2052.4) MB, 4042.1 / 1.2 ms (average mu = 0.067, current mu = 0.006) allocation failure scavenge might not succeed [21816:0000029E47DA1E20] 177915 ms: Mark-sweep (reduce) 2042.5 (2054.4) -> 2041.7 (2054.7) MB, 4592.0 / 1.2 ms (average mu = 0.040, current mu = 0.016) allocation failure scavenge might not succeed

<— JS stacktrace —>

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 1: 00007FF76084058F napi_wrap+109311 2: 00007FF7607E52B6 v8::internal::OrderedHashTablev8::internal::OrderedHashSet,1::NumberOfElementsOffset+33302 3: 00007FF7607E6086 node::OnFatalError+294 4: 00007FF7610B150E v8::Isolate::ReportExternalAllocationLimitReached+94 5: 00007FF76109638D v8::SharedArrayBuffer::Externalize+781 6: 00007FF760F4081C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1516 7: 00007FF760F4BB5A v8::internal::Heap::ProtectUnprotectedMemoryChunks+1258 8: 00007FF760F48D09 v8::internal::Heap::PageFlagsAreConsistent+2457 9: 00007FF760F3D931 v8::internal::Heap::CollectGarbage+2033 10: 00007FF760F3BB35 v8::internal::Heap::AllocateExternalBackingStore+1317 11: 00007FF760F55DD6 v8::internal::Factory::AllocateRaw+166 12: 00007FF760F697F4 v8::internal::FactoryBasev8::internal::Factory::NewFixedArrayWithFiller+84 13: 00007FF760F69745 v8::internal::FactoryBasev8::internal::Factory::NewFixedArray+69 14: 00007FF760E36112 v8::Object::GetIsolate+52802 15: 00007FF760E35472 v8::Object::GetIsolate+49570 16: 00007FF760DBA7B6 v8::internal::LayoutDescriptor::Trim+20038 17: 00007FF760DB6318 v8::internal::LayoutDescriptor::Trim+2472 18: 00007FF760DB9C18 v8::internal::LayoutDescriptor::Trim+17064 19: 00007FF760DB9898 v8::internal::LayoutDescriptor::Trim+16168 20: 00007FF760C9B8C3 v8::internal::interpreter::JumpTableTargetOffsets::iterator::operator=+65171 21: 00007FF760C9BC17 v8::internal::interpreter::JumpTableTargetOffsets::iterator::operator=+66023 22: 00007FF761139EBD v8::internal::SetupIsolateDelegate::SetupHeap+463949 23: 00000241E40F2CF8 error Command failed with exit code 134. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I want to ask you if this last problem has been solved. Many schemes can’t solve the fundamental problem even if they increase the memory. I’m looking for a good monitoring scheme to know which hateful object is occupying my heap memory.