This is a duplicate issue of #1678 since it was closed and mistakened as some js-beautify issue
None of my nuxtjs production environments last more than 39-40hrs. This is the ballpark moment where nuxt/vue seems to crash.
This happens on AWS instance running the Amazon Linux AMI with node v8.3.0
The original crash:
running `HOST=0.0.0.0 nuxt start I get
<--- Last few GCs --->
[8202:0x2822f10] 148084153 ms: Mark-sweep 1399.9 (1494.4) -> 1399.9 (1494.4) MB, 2284.2 / 0.0 ms allocation failure GC in old space requested
[8202:0x2822f10] 148086478 ms: Mark-sweep 1399.9 (1494.4) -> 1399.9 (1494.4) MB, 2323.0 / 0.0 ms last resort
[8202:0x2822f10] 148088794 ms: Mark-sweep 1399.9 (1494.4) -> 1399.9 (1494.4) MB, 2315.4 / 0.0 ms last resort
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x37a56a69cca1 <JSObject>
1: initWatch(aka initWatch) [/home/ec2-user/api/web/node_modules/vue/dist/vue.runtime.common.js:~3296] [pc=0x16c066f78f0b](this=0x37a56a682241 <undefined>,vm=0x361f52ccf229 <Vue$3 map = 0x3a932c4ded49>,watch=0x1374913debb1 <Object map = 0x25ca00203649>)
2: _init [/home/ec2-user/api/web/node_modules/vue/dist/vue.runtime.common.js:~4181] [pc=0x16c06696451c](this=0x361f52ccf229 <Vue$3 map =...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [node]
2: 0x136916c [node]
3: v8::Utils::ReportOOMFailure(char const*, bool) [node]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
5: v8::internal::Factory::NewTransitionArray(int) [node]
6: v8::internal::TransitionArray::Insert(v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Map>, v8::internal::SimpleTransitionFlag) [node]
7: v8::internal::Map::CopyReplaceDescriptors(v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::DescriptorArray>, v8::internal::Handle<v8::internal::LayoutDescriptor>, v8::internal::TransitionFlag, v8::internal::MaybeHandle<v8::internal::Name>, char const*, v8::internal::SimpleTransitionFlag) [node]
8: v8::internal::Map::CopyAddDescriptor(v8::internal::Handle<v8::internal::Map>, v8::internal::Descriptor*, v8::internal::TransitionFlag) [node]
9: v8::internal::Map::CopyWithField(v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::FieldType>, v8::internal::PropertyAttributes, v8::internal::PropertyConstness, v8::internal::Representation, v8::internal::TransitionFlag) [node]
10: v8::internal::Map::TransitionToDataProperty(v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, v8::internal::PropertyConstness, v8::internal::Object::StoreFromKeyed) [node]
11: v8::internal::LookupIterator::PrepareTransitionToDataProperty(v8::internal::Handle<v8::internal::JSObject>, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, v8::internal::Object::StoreFromKeyed) [node]
12: v8::internal::StoreIC::LookupForWrite(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::internal::Object::StoreFromKeyed) [node]
13: v8::internal::StoreIC::UpdateCaches(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::internal::Object::StoreFromKeyed) [node]
14: v8::internal::StoreIC::Store(v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Object>, v8::internal::Object::StoreFromKeyed) [node]
15: v8::internal::Runtime_StoreIC_Miss(int, v8::internal::Object**, v8::internal::Isolate*) [node]
16: 0x16c0667840dd
Done in 148089.23s.
And again today
yarn start v0.27.5
$ HOST=0.0.0.0 nuxt start
OPEN http://localhost:3000
control-settings
control-settings
control-images
<--- Last few GCs --->
[16624:0x2b58f10] 143724943 ms: Mark-sweep 1400.0 (1486.9) -> 1400.0 (1486.9) MB, 2268.4 / 0.0 ms allocation failure GC in old space requested
[16624:0x2b58f10] 143726690 ms: Mark-sweep 1400.0 (1486.9) -> 1400.0 (1486.9) MB, 1746.2 / 0.0 ms last resort
[16624:0x2b58f10] 143728669 ms: Mark-sweep 1400.0 (1486.9) -> 1400.0 (1486.9) MB, 1979.9 / 0.0 ms last resort
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x10cc8381cca1 <JSObject>
2: $watch [/home/ec2-user/api/web/node_modules/vue/dist/vue.runtime.common.js:3362] [bytecode=0xa9573cc5771 offset=58](this=0x3374d9153869 <Vue$3 map = 0x16794112bb81>,expOrFn=0x27709a2361b1 <String[8]: nuxt.err>,cb=0x3374d91549f9 <JSFunction boundFn (sfi = 0xa9573cc3f21)>,options=0x3374d9154ca9 <Object map = 0x13ee4d484829>)
4: createWatcher(aka createWatcher) [/home/ec2-user/api/web/no...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [node]
2: 0x136916c [node]
3: v8::Utils::ReportOOMFailure(char const*, bool) [node]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
5: v8::internal::Factory::NewTransitionArray(int) [node]
6: v8::internal::TransitionArray::Insert(v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Map>, v8::internal::SimpleTransitionFlag) [node]
7: v8::internal::Map::CopyReplaceDescriptors(v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::DescriptorArray>, v8::internal::Handle<v8::internal::LayoutDescriptor>, v8::internal::TransitionFlag, v8::internal::MaybeHandle<v8::internal::Name>, char const*, v8::internal::SimpleTransitionFlag) [node]
8: v8::internal::Map::CopyAddDescriptor(v8::internal::Handle<v8::internal::Map>, v8::internal::Descriptor*, v8::internal::TransitionFlag) [node]
9: v8::internal::Map::CopyWithField(v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::FieldType>, v8::internal::PropertyAttributes, v8::internal::PropertyConstness, v8::internal::Representation, v8::internal::TransitionFlag) [node]
10: v8::internal::Map::TransitionToDataProperty(v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, v8::internal::PropertyConstness, v8::internal::Object::StoreFromKeyed) [node]
11: v8::internal::LookupIterator::PrepareTransitionToDataProperty(v8::internal::Handle<v8::internal::JSObject>, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, v8::internal::Object::StoreFromKeyed) [node]
12: v8::internal::StoreIC::LookupForWrite(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::internal::Object::StoreFromKeyed) [node]
13: v8::internal::StoreIC::UpdateCaches(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::internal::Object::StoreFromKeyed) [node]
14: v8::internal::StoreIC::Store(v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Object>, v8::internal::Object::StoreFromKeyed) [node]
15: v8::internal::Runtime_StoreIC_Miss(int, v8::internal::Object**, v8::internal::Isolate*) [node]
16: 0x2007965840dd
Done in 143729.38s.
bug-confirmed help-wanted pending-repro