New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production memory loss crashes - suggested high priority #1695

Closed
acidjazz opened this Issue Sep 20, 2017 · 72 comments

Comments

Projects
None yet
@acidjazz

acidjazz commented Sep 20, 2017

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.
This bug report is available on Nuxt.js community (#c1519)
@acidjazz

This comment has been minimized.

Show comment
Hide comment
@acidjazz

acidjazz Sep 20, 2017

I also opened an issue on vue.js which was immediately closed, but I have a feeling this might be somewhat tied into having/creating watchers for more than 40hrs:

vuejs/vue#6656

acidjazz commented Sep 20, 2017

I also opened an issue on vue.js which was immediately closed, but I have a feeling this might be somewhat tied into having/creating watchers for more than 40hrs:

vuejs/vue#6656

@pi0

This comment has been minimized.

Show comment
Hide comment
@pi0

pi0 Sep 20, 2017

Member

Hi @acidjazz. There was a known issue with asyncData which should be resolved with latest versions of Nuxt. Also i think this bug is with one of 3rd party plugins you are using. We are using nuxt (w/ watch and SSR) in production and there is not memory leaks.

BTW we need more details to find exact problem. There are some tips for proper memory leak bugs here: #805

Member

pi0 commented Sep 20, 2017

Hi @acidjazz. There was a known issue with asyncData which should be resolved with latest versions of Nuxt. Also i think this bug is with one of 3rd party plugins you are using. We are using nuxt (w/ watch and SSR) in production and there is not memory leaks.

BTW we need more details to find exact problem. There are some tips for proper memory leak bugs here: #805

@acidjazz

This comment has been minimized.

Show comment
Hide comment
@acidjazz

acidjazz Sep 22, 2017

@pi0 thanks, i'm currently not using asyncData just yet in this environment, I'll keep reporting my crashes and doing what I can to help resolve this though

acidjazz commented Sep 22, 2017

@pi0 thanks, i'm currently not using asyncData just yet in this environment, I'll keep reporting my crashes and doing what I can to help resolve this though

@acidjazz

This comment has been minimized.

Show comment
Hide comment
@acidjazz

acidjazz Sep 25, 2017

Here is another repro

[31211:0x38a6f10] 146854394 ms: Mark-sweep 1400.0 (1488.4) -> 1400.0 (1488.4) MB, 2293.6 / 0.0 ms  allocation failure GC in old space requested
[31211:0x38a6f10] 146856186 ms: Mark-sweep 1400.0 (1488.4) -> 1400.0 (1488.4) MB, 1791.3 / 0.0 ms  last resort
[31211:0x38a6f10] 146858242 ms: Mark-sweep 1400.0 (1488.4) -> 1400.0 (1488.4) MB, 2056.0 / 0.0 ms  last resort


<--- JS stacktrace --->

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

Security context: 0x2eb565e9cca1 <JSObject>
    2: $watch [/home/ec2-user/api/web/node_modules/vue/dist/vue.runtime.common.js:3362] [bytecode=0xae770f52f71 offset=58](this=0x211ad76df1e9 <Vue$3 map = 0x35f2c8a41709>,expOrFn=0x12dac85c4bb9 <String[8]: nuxt.err>,cb=0x71f1eb981d9 <JSFunction boundFn (sfi = 0xae770f51721)>,options=0xc25437f5b1 <Object map = 0xc835bc04829>)
    4: createWatcher(aka createWatcher) [/home/ec2-user/api/web/node_m...

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: 0x11d8e2e840dd
Done in 146858.94s.
[ec2-user@ip-172-31-35-207 web]$

acidjazz commented Sep 25, 2017

Here is another repro

[31211:0x38a6f10] 146854394 ms: Mark-sweep 1400.0 (1488.4) -> 1400.0 (1488.4) MB, 2293.6 / 0.0 ms  allocation failure GC in old space requested
[31211:0x38a6f10] 146856186 ms: Mark-sweep 1400.0 (1488.4) -> 1400.0 (1488.4) MB, 1791.3 / 0.0 ms  last resort
[31211:0x38a6f10] 146858242 ms: Mark-sweep 1400.0 (1488.4) -> 1400.0 (1488.4) MB, 2056.0 / 0.0 ms  last resort


<--- JS stacktrace --->

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

Security context: 0x2eb565e9cca1 <JSObject>
    2: $watch [/home/ec2-user/api/web/node_modules/vue/dist/vue.runtime.common.js:3362] [bytecode=0xae770f52f71 offset=58](this=0x211ad76df1e9 <Vue$3 map = 0x35f2c8a41709>,expOrFn=0x12dac85c4bb9 <String[8]: nuxt.err>,cb=0x71f1eb981d9 <JSFunction boundFn (sfi = 0xae770f51721)>,options=0xc25437f5b1 <Object map = 0xc835bc04829>)
    4: createWatcher(aka createWatcher) [/home/ec2-user/api/web/node_m...

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: 0x11d8e2e840dd
Done in 146858.94s.
[ec2-user@ip-172-31-35-207 web]$
@tillkolter

This comment has been minimized.

Show comment
Hide comment
@tillkolter

tillkolter Sep 28, 2017

Hi @acidjazz, I also experienced a memory leak during the last days, but fortunately I was able to track down the error and found out it was my own stupidity. I don't assume that you did any mistake, but maybe my comment here (#1728) can encourage you to investigate your problem.

tillkolter commented Sep 28, 2017

Hi @acidjazz, I also experienced a memory leak during the last days, but fortunately I was able to track down the error and found out it was my own stupidity. I don't assume that you did any mistake, but maybe my comment here (#1728) can encourage you to investigate your problem.

@acidjazz

This comment has been minimized.

Show comment
Hide comment
@acidjazz

acidjazz Sep 29, 2017

much appreciated @tillkolter reading your post now, did you find this error w/in the backtrace of your memory leak? and how long did production run for before your leak occured?

acidjazz commented Sep 29, 2017

much appreciated @tillkolter reading your post now, did you find this error w/in the backtrace of your memory leak? and how long did production run for before your leak occured?

@tillkolter

This comment has been minimized.

Show comment
Hide comment
@tillkolter

tillkolter Sep 29, 2017

@acidjazz Do you mean if I found a hint under the Security context section of the GC error message? In that section I found several different stack traces over time. Sometimes I got even
Cannot get stack trace in GC. Unfortunately I also could not find a direct trace for my error in the heapdump. But only by the pure amount of VueComponent objects (and also tons of Watcher objects btw), I could tell that something was wrong and somehow related to an error during rendering. In my case it was pure stupidity and could have saved me if I would have ignored the dev server output which I usually dont. The leak occured between 10 hours and 48 hours, but I thinks it is not a matter of time, but more how much objects were involved around the error and keep clusters of closure references which the garbage collector can not handle. In your case it could be even a malicious watcher (for a Vuex state mutation) if you always get the stacktrace above. My guess is that the overall problem is a co-production between a hand-made (possibly silent) error during the server side rendering process and an actual leak in the framework (either Vue or Nuxt) that keeps closure references after such an error, but I am no senior JS developer and can not prove it yet :)

tillkolter commented Sep 29, 2017

@acidjazz Do you mean if I found a hint under the Security context section of the GC error message? In that section I found several different stack traces over time. Sometimes I got even
Cannot get stack trace in GC. Unfortunately I also could not find a direct trace for my error in the heapdump. But only by the pure amount of VueComponent objects (and also tons of Watcher objects btw), I could tell that something was wrong and somehow related to an error during rendering. In my case it was pure stupidity and could have saved me if I would have ignored the dev server output which I usually dont. The leak occured between 10 hours and 48 hours, but I thinks it is not a matter of time, but more how much objects were involved around the error and keep clusters of closure references which the garbage collector can not handle. In your case it could be even a malicious watcher (for a Vuex state mutation) if you always get the stacktrace above. My guess is that the overall problem is a co-production between a hand-made (possibly silent) error during the server side rendering process and an actual leak in the framework (either Vue or Nuxt) that keeps closure references after such an error, but I am no senior JS developer and can not prove it yet :)

@acidjazz

This comment has been minimized.

Show comment
Hide comment
@acidjazz

acidjazz Sep 29, 2017

Another repro, this is now using nuxt.js 1.0.0-rc11:

Done in 34.95s.
yarn start v0.27.5
$ HOST=0.0.0.0 nuxt start

 OPEN  http://localhost:3000


<--- Last few GCs --->

[16915:0x4094f10] 142561826 ms: Mark-sweep 1400.1 (1490.5) -> 1400.1 (1489.5) MB, 2316.1 / 0.0 ms  allocation failure GC in old space requested
[16915:0x4094f10] 142564138 ms: Mark-sweep 1400.1 (1489.5) -> 1400.1 (1489.5) MB, 2310.0 / 0.0 ms  (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 2311 ms) last resort
[16915:0x4094f10] 142566457 ms: Mark-sweep 1400.1 (1489.5) -> 1400.1 (1489.5) MB, 2318.9 / 0.0 ms  last resort


<--- JS stacktrace --->

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

Security context: 0x24058599cca1 <JSObject>
    1: extend(aka extend) [/home/ec2-user/api/web/node_modules/vue-server-renderer/build.js:~178] [pc=0x6a3747c14f1](this=0x240585982241 <undefined>,to=0x3f7926ba57a9 <Object map = 0x1c69f9804829>,_from=0x3f7926bed659 <Object map = 0x11f70bc1bc71>)
    2: renderStyle [/home/ec2-user/api/web/node_modules/vue-server-renderer/build.js:~1976] [pc=0x6a37479644f](this=0x19b2b99f5761 <JSArray[4]>,vnode...

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::KeyedStoreIC::Store(v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) [node]
16: v8::internal::Runtime_KeyedStoreIC_Miss(int, v8::internal::Object**, v8::internal::Isolate*) [node]
17: 0x6a3737840dd
Done in 142566.92s.
[ec2-user@ip-172-31-35-207 web]$

acidjazz commented Sep 29, 2017

Another repro, this is now using nuxt.js 1.0.0-rc11:

Done in 34.95s.
yarn start v0.27.5
$ HOST=0.0.0.0 nuxt start

 OPEN  http://localhost:3000


<--- Last few GCs --->

[16915:0x4094f10] 142561826 ms: Mark-sweep 1400.1 (1490.5) -> 1400.1 (1489.5) MB, 2316.1 / 0.0 ms  allocation failure GC in old space requested
[16915:0x4094f10] 142564138 ms: Mark-sweep 1400.1 (1489.5) -> 1400.1 (1489.5) MB, 2310.0 / 0.0 ms  (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 2311 ms) last resort
[16915:0x4094f10] 142566457 ms: Mark-sweep 1400.1 (1489.5) -> 1400.1 (1489.5) MB, 2318.9 / 0.0 ms  last resort


<--- JS stacktrace --->

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

Security context: 0x24058599cca1 <JSObject>
    1: extend(aka extend) [/home/ec2-user/api/web/node_modules/vue-server-renderer/build.js:~178] [pc=0x6a3747c14f1](this=0x240585982241 <undefined>,to=0x3f7926ba57a9 <Object map = 0x1c69f9804829>,_from=0x3f7926bed659 <Object map = 0x11f70bc1bc71>)
    2: renderStyle [/home/ec2-user/api/web/node_modules/vue-server-renderer/build.js:~1976] [pc=0x6a37479644f](this=0x19b2b99f5761 <JSArray[4]>,vnode...

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::KeyedStoreIC::Store(v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) [node]
16: v8::internal::Runtime_KeyedStoreIC_Miss(int, v8::internal::Object**, v8::internal::Isolate*) [node]
17: 0x6a3737840dd
Done in 142566.92s.
[ec2-user@ip-172-31-35-207 web]$
@tillkolter

This comment has been minimized.

Show comment
Hide comment
@tillkolter

tillkolter Sep 30, 2017

@acidjazz Did you go through the heap dumping process as recommended in issue 805? Unfortunately your crash report is not providing any useful information.

tillkolter commented Sep 30, 2017

@acidjazz Did you go through the heap dumping process as recommended in issue 805? Unfortunately your crash report is not providing any useful information.

@acidjazz

This comment has been minimized.

Show comment
Hide comment
@acidjazz

acidjazz Oct 7, 2017

Here is another dump.

@tillkolter I have not yet, in crunch time right now but as soon as I can find time I will.

yarn start v0.27.5
$ HOST=0.0.0.0 nuxt start

 OPEN  http://localhost:3000


<--- Last few GCs --->

[25292:0x31a4f10] 139828688 ms: Mark-sweep 1399.9 (1495.0) -> 1399.9 (1495.0) MB, 2326.5 / 0.0 ms  allocation failure GC in old space requested
[25292:0x31a4f10] 139831010 ms: Mark-sweep 1399.9 (1495.0) -> 1399.9 (1495.0) MB, 2321.3 / 0.0 ms  last resort
[25292:0x31a4f10] 139833316 ms: Mark-sweep 1399.9 (1495.0) -> 1399.9 (1495.0) MB, 2305.3 / 0.0 ms  last resort


<--- JS stacktrace --->

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

Security context: 0x316fa191cca1 <JSObject>
    1: createWatcher(aka createWatcher) [/home/ec2-user/api/web/node_modules/vue/dist/vue.runtime.common.js:~3310] [pc=0x31ca5262a62a](this=0x316fa1902241 <undefined>,vm=0x351a29232eb1 <Vue$3 map = 0x209f5b45a679>,keyOrFn=0x162175307581 <String[8]: nuxt.err>,handler=0x1621753075a1 <String[12]: errorChanged>,options=0x316fa1902241 <undefined>)
    2: arguments adaptor frame: 3->4
    4: initWatch...

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: 0x31ca51c840dd
Done in 139833.78s.

acidjazz commented Oct 7, 2017

Here is another dump.

@tillkolter I have not yet, in crunch time right now but as soon as I can find time I will.

yarn start v0.27.5
$ HOST=0.0.0.0 nuxt start

 OPEN  http://localhost:3000


<--- Last few GCs --->

[25292:0x31a4f10] 139828688 ms: Mark-sweep 1399.9 (1495.0) -> 1399.9 (1495.0) MB, 2326.5 / 0.0 ms  allocation failure GC in old space requested
[25292:0x31a4f10] 139831010 ms: Mark-sweep 1399.9 (1495.0) -> 1399.9 (1495.0) MB, 2321.3 / 0.0 ms  last resort
[25292:0x31a4f10] 139833316 ms: Mark-sweep 1399.9 (1495.0) -> 1399.9 (1495.0) MB, 2305.3 / 0.0 ms  last resort


<--- JS stacktrace --->

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

Security context: 0x316fa191cca1 <JSObject>
    1: createWatcher(aka createWatcher) [/home/ec2-user/api/web/node_modules/vue/dist/vue.runtime.common.js:~3310] [pc=0x31ca5262a62a](this=0x316fa1902241 <undefined>,vm=0x351a29232eb1 <Vue$3 map = 0x209f5b45a679>,keyOrFn=0x162175307581 <String[8]: nuxt.err>,handler=0x1621753075a1 <String[12]: errorChanged>,options=0x316fa1902241 <undefined>)
    2: arguments adaptor frame: 3->4
    4: initWatch...

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: 0x31ca51c840dd
Done in 139833.78s.
@acidjazz

This comment has been minimized.

Show comment
Hide comment
@acidjazz

acidjazz Oct 8, 2017

Another today

yarn start v0.27.5
$ HOST=0.0.0.0 nuxt start

 OPEN  http://localhost:3000


<--- Last few GCs --->

[2013:0x3543f10] 58198471 ms: Mark-sweep 1401.2 (1476.4) -> 1401.2 (1476.4) MB, 2235.7 / 0.0 ms  (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 2236 ms) last resort
[2013:0x3543f10] 58200714 ms: Mark-sweep 1401.2 (1476.4) -> 1401.2 (1476.4) MB, 2243.3 / 0.0 ms  last resort


<--- JS stacktrace --->

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

Security context: 0x2d5ae0c9cca1 <JSObject>
    0: builtin exit frame: assign(this=0x2d5ae0c9b6c9 <JSFunction Object (sfi = 0x2d5ae0c9b619)>,0x1cbc70de0769 <Object map = 0x67fc6b225a1>,0x2e8bcae0cbc1 <Object map = 0x8b0ff218e9>,0x2422aebd8c41 <Object map = 0x67fc6b04829>)

    1: renderAttrs [/home/ec2-user/api/web/node_modules/vue-server-renderer/build.js:~335] [pc=0x19b51c2a7d7f](this=0x777640f5761 <JSArray[4]>,node=0x2422aebd8b31 <VNod...

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::Object::AddDataProperty(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, v8::internal::Object::ShouldThrow, v8::internal::Object::StoreFromKeyed) [node]
13: v8::internal::Object::SetProperty(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::internal::LanguageMode, v8::internal::Object::StoreFromKeyed) [node]
14: v8::internal::JSReceiver::SetOrCopyDataProperties(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSReceiver>, v8::internal::Handle<v8::internal::Object>, v8::internal::ScopedVector<v8::internal::Handle<v8::internal::Object> > const*, bool) [node]
15: 0xc57957 [node]
16: v8::internal::Builtin_ObjectAssign(int, v8::internal::Object**, v8::internal::Isolate*) [node]
17: 0x19b51c13c8dd
Done in 58201.61s.

acidjazz commented Oct 8, 2017

Another today

yarn start v0.27.5
$ HOST=0.0.0.0 nuxt start

 OPEN  http://localhost:3000


<--- Last few GCs --->

[2013:0x3543f10] 58198471 ms: Mark-sweep 1401.2 (1476.4) -> 1401.2 (1476.4) MB, 2235.7 / 0.0 ms  (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 2236 ms) last resort
[2013:0x3543f10] 58200714 ms: Mark-sweep 1401.2 (1476.4) -> 1401.2 (1476.4) MB, 2243.3 / 0.0 ms  last resort


<--- JS stacktrace --->

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

Security context: 0x2d5ae0c9cca1 <JSObject>
    0: builtin exit frame: assign(this=0x2d5ae0c9b6c9 <JSFunction Object (sfi = 0x2d5ae0c9b619)>,0x1cbc70de0769 <Object map = 0x67fc6b225a1>,0x2e8bcae0cbc1 <Object map = 0x8b0ff218e9>,0x2422aebd8c41 <Object map = 0x67fc6b04829>)

    1: renderAttrs [/home/ec2-user/api/web/node_modules/vue-server-renderer/build.js:~335] [pc=0x19b51c2a7d7f](this=0x777640f5761 <JSArray[4]>,node=0x2422aebd8b31 <VNod...

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::Object::AddDataProperty(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, v8::internal::Object::ShouldThrow, v8::internal::Object::StoreFromKeyed) [node]
13: v8::internal::Object::SetProperty(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::internal::LanguageMode, v8::internal::Object::StoreFromKeyed) [node]
14: v8::internal::JSReceiver::SetOrCopyDataProperties(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSReceiver>, v8::internal::Handle<v8::internal::Object>, v8::internal::ScopedVector<v8::internal::Handle<v8::internal::Object> > const*, bool) [node]
15: 0xc57957 [node]
16: v8::internal::Builtin_ObjectAssign(int, v8::internal::Object**, v8::internal::Isolate*) [node]
17: 0x19b51c13c8dd
Done in 58201.61s.
@onlyurei

This comment has been minimized.

Show comment
Hide comment
@onlyurei

onlyurei Oct 9, 2017

I experienced a similar issue, the culprit was @nuxt/axios@4.4.0. I downgraded to the latest 3.x version which is 3.1.4 and the most noticeable memory leak in my Nuxt app stopped.

With @nuxt/axios@4.4.0, the axios plugin seems to be registered with every SSR request! 😮

screen shot 2017-10-09 at 1 19 57 am

215 Axios instances!
screen shot 2017-10-09 at 1 18 54 am

Since I set --max_old_space_size=400 (512 MB memory small host constraint), the app crashed after only about 200 requests (I was using integrity to crawl the links on the Nuxt app locally).

After downgraded to @nuxtjs/axios@^3.1.4, the symptom went away, and the crawling sustained to more than 1500 pages before I manually stopped. Memory was stable and clocked at around 650 MB when I stopped crawling. There might be other app specific small leakages but this one mentioned was the most obvious and severe.

This is the count for Axios in the heapdump with @nuxtjs/axios@^3.1.4 after I manually stopped the crawler on around 1500 successful SSR page requests:

Only 4 Axios instances
screen shot 2017-10-09 at 1 19 10 am

onlyurei commented Oct 9, 2017

I experienced a similar issue, the culprit was @nuxt/axios@4.4.0. I downgraded to the latest 3.x version which is 3.1.4 and the most noticeable memory leak in my Nuxt app stopped.

With @nuxt/axios@4.4.0, the axios plugin seems to be registered with every SSR request! 😮

screen shot 2017-10-09 at 1 19 57 am

215 Axios instances!
screen shot 2017-10-09 at 1 18 54 am

Since I set --max_old_space_size=400 (512 MB memory small host constraint), the app crashed after only about 200 requests (I was using integrity to crawl the links on the Nuxt app locally).

After downgraded to @nuxtjs/axios@^3.1.4, the symptom went away, and the crawling sustained to more than 1500 pages before I manually stopped. Memory was stable and clocked at around 650 MB when I stopped crawling. There might be other app specific small leakages but this one mentioned was the most obvious and severe.

This is the count for Axios in the heapdump with @nuxtjs/axios@^3.1.4 after I manually stopped the crawler on around 1500 successful SSR page requests:

Only 4 Axios instances
screen shot 2017-10-09 at 1 19 10 am

@acidjazz

This comment has been minimized.

Show comment
Hide comment
@acidjazz

acidjazz Oct 9, 2017

@onlyurei i think this might be it, i use @nuxtjs/axios everywhere as well and I'm at 4.3, excellent work

acidjazz commented Oct 9, 2017

@onlyurei i think this might be it, i use @nuxtjs/axios everywhere as well and I'm at 4.3, excellent work

@tillkolter

This comment has been minimized.

Show comment
Hide comment
@tillkolter

tillkolter Oct 9, 2017

I am happy to hear, that memory management seems stable after downgrading Axios, but in my case this should not have been the problem since I use GraphQL with apollo-client instead of axios.

tillkolter commented Oct 9, 2017

I am happy to hear, that memory management seems stable after downgrading Axios, but in my case this should not have been the problem since I use GraphQL with apollo-client instead of axios.

@Atinux Atinux added the type: bug label Oct 9, 2017

@Atinux

This comment has been minimized.

Show comment
Hide comment
@Atinux

Atinux Oct 9, 2017

Member

Hi,

I believe it's more related to inject directly, I will investigate with @pi0 on it.

Member

Atinux commented Oct 9, 2017

Hi,

I believe it's more related to inject directly, I will investigate with @pi0 on it.

@lukasborawski

This comment has been minimized.

Show comment
Hide comment
@lukasborawski

lukasborawski Oct 17, 2017

@Atinux any updates in here? My instance on AWS is crashing too.

lukasborawski commented Oct 17, 2017

@Atinux any updates in here? My instance on AWS is crashing too.

@Atinux

This comment has been minimized.

Show comment
Hide comment
@Atinux

Atinux Oct 17, 2017

Member

I am working on it

Member

Atinux commented Oct 17, 2017

I am working on it

@lukasborawski

This comment has been minimized.

Show comment
Hide comment
@lukasborawski

lukasborawski Oct 17, 2017

@Atinux I would like to add that I'm not using axios module, just normal dependency...

lukasborawski commented Oct 17, 2017

@Atinux I would like to add that I'm not using axios module, just normal dependency...

@pi0

This comment has been minimized.

Show comment
Hide comment
@pi0

pi0 Oct 17, 2017

Member

@lukasborawski Any other modules/plugins do you use?

Member

pi0 commented Oct 17, 2017

@lukasborawski Any other modules/plugins do you use?

@lukasborawski

This comment has been minimized.

Show comment
Hide comment
@lukasborawski

lukasborawski Oct 17, 2017

@pi0 here are my plugins:

zrzut ekranu 2017-10-17 o 14 10 55

Filters are custom Vue filters.

lukasborawski commented Oct 17, 2017

@pi0 here are my plugins:

zrzut ekranu 2017-10-17 o 14 10 55

Filters are custom Vue filters.

@pi0

This comment has been minimized.

Show comment
Hide comment
@pi0

pi0 Oct 17, 2017

Member

Thanks for sharing your status. Are you using inject inside your axios plugin?

Member

pi0 commented Oct 17, 2017

Thanks for sharing your status. Are you using inject inside your axios plugin?

@lukasborawski

This comment has been minimized.

Show comment
Hide comment
@lukasborawski

lukasborawski Oct 17, 2017

@pi0 Nope. Just {store, redirect, route}.

Also I've noticed that this might happen after some requests peak.

lukasborawski commented Oct 17, 2017

@pi0 Nope. Just {store, redirect, route}.

Also I've noticed that this might happen after some requests peak.

@leahciMic

This comment has been minimized.

Show comment
Hide comment
@leahciMic

leahciMic Dec 20, 2017

If anyone else is having issues with Nuxt crashing due to memory leaks or other things and wants a solution that allows your site to be up 100% of the time (restarting after the crash is not a good solution, you will drop clients, and things aren't great when the server is low on ram). Then you're welcome to use a solution I wrote for an application I built in Nuxt.

It will spin up a few workers in a cluster. After a specified amount of time/ amount of requests, the worker will tell the master it's going down soon. At this point, the master will spin up a new worker to replace it (this is important, you don't want to be in a position where there are 0 workers). This has solved all my memory issues, and all my 502 gateway errors (i use nginx in front of it).

It's not packaged or anything, but here is the source:

const cluster = require('cluster');
const os = require('os');
const { Nuxt } = require('nuxt');
const config = require('./nuxt.config.js');
const app = require('express')();
const morgan = require('morgan');

config.dev = false;

const nuxt = new Nuxt(config);

const host = process.env.HOST || '127.0.0.1';
const port = process.env.PORT || 3000;

// default 30 minutes
const MAX_UPTIME = Math.max(process.env.MAX_UPTIME || 0, 5 * 60 * 1000);
const MAX_REQUESTS = Math.max(process.env.MAX_REQUESTS || 0, 100);

const MIN_UPTIME = MAX_UPTIME - (30 * 1000);
const MIN_REQUESTS = MAX_REQUESTS - 50;

const numWorkers = process.env.NUM_WORKERS || os.cpus().length;

function ensureWorkers() {
  for (let i = Object.keys(cluster.workers).length; i < numWorkers; i += 1) {
    cluster.fork();
  }
}

if (cluster.isMaster) {
  ensureWorkers();

  cluster.on('exit', (worker, code, signal) => {
    console.log(
      'worker %d died (%s). restarting...',
      worker.process.pid,
      signal || code,
    );
    ensureWorkers();
  });

  cluster.on('message', (msg) => {
    if (msg === 'BYE') {
      console.log('Spinning up new worker in advance for anticipation of worker shutdown');
      cluster.fork();
    }
  });
} else {
  let numRequests = 0;
  let isClosing = false;
  let server;

  const STOP_AFTER_REQUESTS = Math.round((Math.random() * (MAX_REQUESTS - MIN_REQUESTS)) + MIN_REQUESTS);
  const STOP_AFTER_TIME = Math.round((Math.random() * (MAX_UPTIME - MIN_UPTIME)) + MIN_UPTIME);
  const log = (...args) => {
    console.log(`${process.pid}: `, ...args);
  };

  const close = () => {
    if (isClosing) {
      return;
    }
    isClosing = true;

    process.send('BYE');

    setTimeout(() => {
      log('Shutting down gracefully');
      server.close(() => {
        log('Shutdown complete');
        process.exit(0);
      });
    }, 15000);
  };

  morgan.token('pid', () => process.pid);
  app.use(morgan('[worker: :pid] :status :method :url - :response-time'));

  log('Will shutdown after', STOP_AFTER_REQUESTS, 'requests');
  app.use((req, res, next) => {
    numRequests += 1;
    if (numRequests > STOP_AFTER_REQUESTS) {
      log('Closing due to STOP_AFTER_REQUESTS');
      close();
    }
    log(req.url);
    next();
  });


  log('Will shutdown in', STOP_AFTER_TIME / 1000, 'seconds');
  setTimeout(() => {
    log('Closing due to STOP_AFTER_TIME being reached');
    close();
  }, STOP_AFTER_TIME);

  nuxt.plugin('renderer', (renderer) => {
    renderer.plugin('setupMiddleware', () => {
      log('Up and running');
      app.use(nuxt.render);
      server = app.listen(port, host);
    });
  });
}

I hope it helps.

leahciMic commented Dec 20, 2017

If anyone else is having issues with Nuxt crashing due to memory leaks or other things and wants a solution that allows your site to be up 100% of the time (restarting after the crash is not a good solution, you will drop clients, and things aren't great when the server is low on ram). Then you're welcome to use a solution I wrote for an application I built in Nuxt.

It will spin up a few workers in a cluster. After a specified amount of time/ amount of requests, the worker will tell the master it's going down soon. At this point, the master will spin up a new worker to replace it (this is important, you don't want to be in a position where there are 0 workers). This has solved all my memory issues, and all my 502 gateway errors (i use nginx in front of it).

It's not packaged or anything, but here is the source:

const cluster = require('cluster');
const os = require('os');
const { Nuxt } = require('nuxt');
const config = require('./nuxt.config.js');
const app = require('express')();
const morgan = require('morgan');

config.dev = false;

const nuxt = new Nuxt(config);

const host = process.env.HOST || '127.0.0.1';
const port = process.env.PORT || 3000;

// default 30 minutes
const MAX_UPTIME = Math.max(process.env.MAX_UPTIME || 0, 5 * 60 * 1000);
const MAX_REQUESTS = Math.max(process.env.MAX_REQUESTS || 0, 100);

const MIN_UPTIME = MAX_UPTIME - (30 * 1000);
const MIN_REQUESTS = MAX_REQUESTS - 50;

const numWorkers = process.env.NUM_WORKERS || os.cpus().length;

function ensureWorkers() {
  for (let i = Object.keys(cluster.workers).length; i < numWorkers; i += 1) {
    cluster.fork();
  }
}

if (cluster.isMaster) {
  ensureWorkers();

  cluster.on('exit', (worker, code, signal) => {
    console.log(
      'worker %d died (%s). restarting...',
      worker.process.pid,
      signal || code,
    );
    ensureWorkers();
  });

  cluster.on('message', (msg) => {
    if (msg === 'BYE') {
      console.log('Spinning up new worker in advance for anticipation of worker shutdown');
      cluster.fork();
    }
  });
} else {
  let numRequests = 0;
  let isClosing = false;
  let server;

  const STOP_AFTER_REQUESTS = Math.round((Math.random() * (MAX_REQUESTS - MIN_REQUESTS)) + MIN_REQUESTS);
  const STOP_AFTER_TIME = Math.round((Math.random() * (MAX_UPTIME - MIN_UPTIME)) + MIN_UPTIME);
  const log = (...args) => {
    console.log(`${process.pid}: `, ...args);
  };

  const close = () => {
    if (isClosing) {
      return;
    }
    isClosing = true;

    process.send('BYE');

    setTimeout(() => {
      log('Shutting down gracefully');
      server.close(() => {
        log('Shutdown complete');
        process.exit(0);
      });
    }, 15000);
  };

  morgan.token('pid', () => process.pid);
  app.use(morgan('[worker: :pid] :status :method :url - :response-time'));

  log('Will shutdown after', STOP_AFTER_REQUESTS, 'requests');
  app.use((req, res, next) => {
    numRequests += 1;
    if (numRequests > STOP_AFTER_REQUESTS) {
      log('Closing due to STOP_AFTER_REQUESTS');
      close();
    }
    log(req.url);
    next();
  });


  log('Will shutdown in', STOP_AFTER_TIME / 1000, 'seconds');
  setTimeout(() => {
    log('Closing due to STOP_AFTER_TIME being reached');
    close();
  }, STOP_AFTER_TIME);

  nuxt.plugin('renderer', (renderer) => {
    renderer.plugin('setupMiddleware', () => {
      log('Up and running');
      app.use(nuxt.render);
      server = app.listen(port, host);
    });
  });
}

I hope it helps.

@KonstantinVlasov

This comment has been minimized.

Show comment
Hide comment
@KonstantinVlasov

KonstantinVlasov Dec 20, 2017

Hi guys! I can confirm that rc11 don't have memory issues with our project. We have nuxt in production with own simple axios plugin. Also, we had problems with memory leaks with some of our plugin that creates event listeners in created hook, so we move it to mounted hook. Currently, we have 20 requests per seconds on production and no memory problems.

KonstantinVlasov commented Dec 20, 2017

Hi guys! I can confirm that rc11 don't have memory issues with our project. We have nuxt in production with own simple axios plugin. Also, we had problems with memory leaks with some of our plugin that creates event listeners in created hook, so we move it to mounted hook. Currently, we have 20 requests per seconds on production and no memory problems.

@pimlie

This comment has been minimized.

Show comment
Hide comment
@pimlie

pimlie Dec 20, 2017

Contributor

You could also install the next version of nuxt: yarn add nuxt@next. This installs the latest version which should work most of the time. The memory leak has at least been fixed already.
Just test this in your dev setup and if tests are ok use the specific commit hash to install the same version on your production server.

Contributor

pimlie commented Dec 20, 2017

You could also install the next version of nuxt: yarn add nuxt@next. This installs the latest version which should work most of the time. The memory leak has at least been fixed already.
Just test this in your dev setup and if tests are ok use the specific commit hash to install the same version on your production server.

@christophwolff

This comment has been minimized.

Show comment
Hide comment
@christophwolff

christophwolff Dec 21, 2017

@KonstantinVlasov Have you tried the official axios module? For me there was the mem leak comming from. Can you share your simple axios plugin? Would be interesting. Thank you

christophwolff commented Dec 21, 2017

@KonstantinVlasov Have you tried the official axios module? For me there was the mem leak comming from. Can you share your simple axios plugin? Would be interesting. Thank you

@KonstantinVlasov

This comment has been minimized.

Show comment
Hide comment
@KonstantinVlasov

KonstantinVlasov Dec 21, 2017

@christophwolff I have not tried axios module, because when I start to work with nuxt, there was no modules at all :)
Our plugin really simple:

import axios from 'axios'

let baseURL = process.env.apiUrl

export default axios.create({
  baseURL
})

Important point, you need to and this plugin only to vendors, not plugins.

KonstantinVlasov commented Dec 21, 2017

@christophwolff I have not tried axios module, because when I start to work with nuxt, there was no modules at all :)
Our plugin really simple:

import axios from 'axios'

let baseURL = process.env.apiUrl

export default axios.create({
  baseURL
})

Important point, you need to and this plugin only to vendors, not plugins.

@christophwolff

This comment has been minimized.

Show comment
Hide comment
@christophwolff

christophwolff Dec 21, 2017

@KonstantinVlasov Ahh similar to my solution. I think the axios module is causing the Mem Leak. not nuxt.
#1695 (comment)

christophwolff commented Dec 21, 2017

@KonstantinVlasov Ahh similar to my solution. I think the axios module is causing the Mem Leak. not nuxt.
#1695 (comment)

@WilliamDASILVA

This comment has been minimized.

Show comment
Hide comment
@WilliamDASILVA

WilliamDASILVA Jan 9, 2018

Hi there,

Still having huge issues with memory on the latest version (1.0.0-gh-ae754af)
Not even using Axios at all on my side.

<--- Last few GCs --->

[26265:0x102802400] 15703442 ms: Mark-sweep 1376.7 (1597.8) -> 1376.7 (1593.3) MB, 842.0 / 0.0 ms  allocation failure GC in old space requested
[26265:0x102802400] 15704301 ms: Mark-sweep 1376.7 (1593.3) -> 1376.7 (1546.3) MB, 859.0 / 0.0 ms  last resort 
[26265:0x102802400] 15705149 ms: Mark-sweep 1376.7 (1546.3) -> 1376.7 (1533.3) MB, 848.6 / 0.0 ms  last resort 


<--- JS stacktrace --->

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

Security context: 0xf2626d28799 <JSObject>
    1: DoJoin(aka DoJoin) [native array.js:~95] [pc=0x306a4024f30f](this=0x1a622fc82311 <undefined>,p=0x2d2bced95e61 <JSArray[4]>,q=4,E=0x1a622fc823b1 <true>,A=0x1a622fc82471 <String[0]: >,z=0x1a622fc82421 <false>)
    2: Join(aka Join) [native array.js:~120] [pc=0x306a3fb220e9](this=0x1a622fc82311 <undefined>,p=0x2d2bced95e61 <JSArray[4]>,q=4,A=0x1a622fc82471 <String[0]: >,z=0x1a622fc82421 <fals...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [/Users/william/.nvm/versions/node/v8.5.0/bin/node]
 2: node::FatalException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>) [/Users/william/.nvm/versions/node/v8.5.0/bin/node]
 3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/Users/william/.nvm/versions/node/v8.5.0/bin/node]
 4: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [/Users/william/.nvm/versions/node/v8.5.0/bin/node]
 5: v8::internal::Runtime_StringBuilderConcat(int, v8::internal::Object**, v8::internal::Isolate*) [/Users/william/.nvm/versions/node/v8.5.0/bin/node]
 6: 0x306a3ed846fd
 7: 0x306a4024f30f
 8: 0x306a3fb220e9
 9: 0x306a401561f4
10: 0x306a4024f6c0
11: 0x306a4090b7b9
12: 0x306a3ee79e09
13: 0x306a3ee3f075
14: 0x306a3ed85d7b

And Heroku is getting crazy.

heroku

Waiting for the next stable release of Nuxt to see if it does change something.

WilliamDASILVA commented Jan 9, 2018

Hi there,

Still having huge issues with memory on the latest version (1.0.0-gh-ae754af)
Not even using Axios at all on my side.

<--- Last few GCs --->

[26265:0x102802400] 15703442 ms: Mark-sweep 1376.7 (1597.8) -> 1376.7 (1593.3) MB, 842.0 / 0.0 ms  allocation failure GC in old space requested
[26265:0x102802400] 15704301 ms: Mark-sweep 1376.7 (1593.3) -> 1376.7 (1546.3) MB, 859.0 / 0.0 ms  last resort 
[26265:0x102802400] 15705149 ms: Mark-sweep 1376.7 (1546.3) -> 1376.7 (1533.3) MB, 848.6 / 0.0 ms  last resort 


<--- JS stacktrace --->

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

Security context: 0xf2626d28799 <JSObject>
    1: DoJoin(aka DoJoin) [native array.js:~95] [pc=0x306a4024f30f](this=0x1a622fc82311 <undefined>,p=0x2d2bced95e61 <JSArray[4]>,q=4,E=0x1a622fc823b1 <true>,A=0x1a622fc82471 <String[0]: >,z=0x1a622fc82421 <false>)
    2: Join(aka Join) [native array.js:~120] [pc=0x306a3fb220e9](this=0x1a622fc82311 <undefined>,p=0x2d2bced95e61 <JSArray[4]>,q=4,A=0x1a622fc82471 <String[0]: >,z=0x1a622fc82421 <fals...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [/Users/william/.nvm/versions/node/v8.5.0/bin/node]
 2: node::FatalException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>) [/Users/william/.nvm/versions/node/v8.5.0/bin/node]
 3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/Users/william/.nvm/versions/node/v8.5.0/bin/node]
 4: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [/Users/william/.nvm/versions/node/v8.5.0/bin/node]
 5: v8::internal::Runtime_StringBuilderConcat(int, v8::internal::Object**, v8::internal::Isolate*) [/Users/william/.nvm/versions/node/v8.5.0/bin/node]
 6: 0x306a3ed846fd
 7: 0x306a4024f30f
 8: 0x306a3fb220e9
 9: 0x306a401561f4
10: 0x306a4024f6c0
11: 0x306a4090b7b9
12: 0x306a3ee79e09
13: 0x306a3ee3f075
14: 0x306a3ed85d7b

And Heroku is getting crazy.

heroku

Waiting for the next stable release of Nuxt to see if it does change something.

@pi0

This comment has been minimized.

Show comment
Hide comment
@pi0

pi0 Jan 9, 2018

Member

@WilliamDASILVA Actually latest release is 1.0.0. Are you getting this error on production mode? (nuxt-start). This problem may be originating from some of used liberaries. Sharing a list of them may help :)

Member

pi0 commented Jan 9, 2018

@WilliamDASILVA Actually latest release is 1.0.0. Are you getting this error on production mode? (nuxt-start). This problem may be originating from some of used liberaries. Sharing a list of them may help :)

@KonstantinVlasov

This comment has been minimized.

Show comment
Hide comment
@KonstantinVlasov

KonstantinVlasov Jan 9, 2018

@WilliamDASILVA some plugins or libraries can create event listeners at the created hook, it cause memory leak. In our project we turn off components one by one to find problems code.

KonstantinVlasov commented Jan 9, 2018

@WilliamDASILVA some plugins or libraries can create event listeners at the created hook, it cause memory leak. In our project we turn off components one by one to find problems code.

@christophwolff

This comment has been minimized.

Show comment
Hide comment
@christophwolff

christophwolff Jan 9, 2018

@KonstantinVlasov Exactly what i have done. @WilliamDASILVA Trail and error. Sometimes its like that :-/

christophwolff commented Jan 9, 2018

@KonstantinVlasov Exactly what i have done. @WilliamDASILVA Trail and error. Sometimes its like that :-/

@bovas85

This comment has been minimized.

Show comment
Hide comment
@bovas85

bovas85 Jan 11, 2018

I get this too but I can't turn off plugins as that would destroy the app

bovas85 commented Jan 11, 2018

I get this too but I can't turn off plugins as that would destroy the app

@mlyknown

This comment has been minimized.

Show comment
Hide comment
@mlyknown

mlyknown Jan 12, 2018

Maybe should add vendor to nuxt.config such as 'vendor: ['axios', 'lodash', 'echarts']'

mlyknown commented Jan 12, 2018

Maybe should add vendor to nuxt.config such as 'vendor: ['axios', 'lodash', 'echarts']'

@bovas85

This comment has been minimized.

Show comment
Hide comment
@bovas85

bovas85 Jan 12, 2018

My issue I think was a custom error page which never was reached. It would try to render everything after / that wasn't a page as a custom page for some reason.

Fixing error layout made it work again but this might be another issue

bovas85 commented Jan 12, 2018

My issue I think was a custom error page which never was reached. It would try to render everything after / that wasn't a page as a custom page for some reason.

Fixing error layout made it work again but this might be another issue

@CicholGricenchos

This comment has been minimized.

Show comment
Hide comment
@CicholGricenchos

CicholGricenchos Jan 25, 2018

In my observation with nuxt 1.1.1 and nuxtjs/axios, the memory leak situation is eased a lot. Now my app occupied 630m after 8601 reqs. The same code under nuxt 1.0.0-rc11 will quickly occupy 1.6G and then OOM after 1921 reqs.

The memory usage is still increasing along with incoming requests, but very slow. I guess axios module is no longer a main cause of memory leak.

CicholGricenchos commented Jan 25, 2018

In my observation with nuxt 1.1.1 and nuxtjs/axios, the memory leak situation is eased a lot. Now my app occupied 630m after 8601 reqs. The same code under nuxt 1.0.0-rc11 will quickly occupy 1.6G and then OOM after 1921 reqs.

The memory usage is still increasing along with incoming requests, but very slow. I guess axios module is no longer a main cause of memory leak.

@bovas85

This comment has been minimized.

Show comment
Hide comment
@bovas85

bovas85 Jan 25, 2018

Yes I can confirm the memory leaks are gone with 1.1.1 so far

bovas85 commented Jan 25, 2018

Yes I can confirm the memory leaks are gone with 1.1.1 so far

@Atinux Atinux closed this Jan 25, 2018

@psnoonan

This comment has been minimized.

Show comment
Hide comment
@psnoonan

psnoonan Feb 1, 2018

I have a site with nuxt:1.2.1 and nuxtjs/axios:4.5.2 that has been live for 5 days with no problems. I upgraded to nuxtjs/axios:5.0.0-rc.2 yesterday and immediately saw a memory problem.

Just FYI.

memory-leak

psnoonan commented Feb 1, 2018

I have a site with nuxt:1.2.1 and nuxtjs/axios:4.5.2 that has been live for 5 days with no problems. I upgraded to nuxtjs/axios:5.0.0-rc.2 yesterday and immediately saw a memory problem.

Just FYI.

memory-leak

@pi0

This comment has been minimized.

Show comment
Hide comment
@pi0

pi0 Feb 1, 2018

Member

@psnoonan Would you please open an issue in axios-module repo with more details (Memory dump or Nuxt config). BTW thanks for the report.

Member

pi0 commented Feb 1, 2018

@psnoonan Would you please open an issue in axios-module repo with more details (Memory dump or Nuxt config). BTW thanks for the report.

@awronski

This comment has been minimized.

Show comment
Hide comment
@awronski

awronski Feb 2, 2018

@psnoonan What do you use for memory tracking and for the charts?

awronski commented Feb 2, 2018

@psnoonan What do you use for memory tracking and for the charts?

@lukasborawski

This comment has been minimized.

Show comment
Hide comment
@lukasborawski

lukasborawski Feb 2, 2018

@pi0 @Atinux what is the preferred version of Axios that is not crashing the app for sure? I'm also still experiencing the memory leaks. I'm not using the Axios module. Just clean installation.

zrzut ekranu 2018-02-02 o 15 24 48

lukasborawski commented Feb 2, 2018

@pi0 @Atinux what is the preferred version of Axios that is not crashing the app for sure? I'm also still experiencing the memory leaks. I'm not using the Axios module. Just clean installation.

zrzut ekranu 2018-02-02 o 15 24 48

@pi0

This comment has been minimized.

Show comment
Hide comment
@pi0

pi0 Feb 2, 2018

Member

Unfortunately, this is not only axios causing leaks. Although, axios module has some internal workarounds to prevent known issues. So using it is recommended. We try to continuously check for new problems.

@awronski It is heroku, I think.

Member

pi0 commented Feb 2, 2018

Unfortunately, this is not only axios causing leaks. Although, axios module has some internal workarounds to prevent known issues. So using it is recommended. We try to continuously check for new problems.

@awronski It is heroku, I think.

@psnoonan

This comment has been minimized.

Show comment
Hide comment
@psnoonan

psnoonan Feb 2, 2018

@awronski Yes, it is Heroku

@pi0 Indeed, axios is not the only thing causing leaks. I also had one listener in the created() lifecycle event, in one component only, and it was enough to cause a slow rise in memory usage. I switched to mounted() and it seems to have gone away.

psnoonan commented Feb 2, 2018

@awronski Yes, it is Heroku

@pi0 Indeed, axios is not the only thing causing leaks. I also had one listener in the created() lifecycle event, in one component only, and it was enough to cause a slow rise in memory usage. I switched to mounted() and it seems to have gone away.

@psnoonan

This comment has been minimized.

Show comment
Hide comment
@psnoonan

psnoonan Feb 2, 2018

I did some more testing today and started adding in the things that seemed to be causing the memory issues, one by one and letting them sit for a few hours.

I updated the nuxtjs/axios module version to 5.0.0-rc2, and there were no issues.
Then I added the timeout code back, and there were no issues.

I guess the memory problem was only from the listener in the created lifecycle event, and not from nuxtjs/axios.

Sorry!

psnoonan commented Feb 2, 2018

I did some more testing today and started adding in the things that seemed to be causing the memory issues, one by one and letting them sit for a few hours.

I updated the nuxtjs/axios module version to 5.0.0-rc2, and there were no issues.
Then I added the timeout code back, and there were no issues.

I guess the memory problem was only from the listener in the created lifecycle event, and not from nuxtjs/axios.

Sorry!

@lukasborawski

This comment has been minimized.

Show comment
Hide comment
@lukasborawski

lukasborawski Feb 12, 2018

@psnoonan what is the solution then?

lukasborawski commented Feb 12, 2018

@psnoonan what is the solution then?

@psnoonan

This comment has been minimized.

Show comment
Hide comment
@psnoonan

psnoonan Feb 12, 2018

@lukasborawski I put my listener in a mounted hook instead of a created hook.

psnoonan commented Feb 12, 2018

@lukasborawski I put my listener in a mounted hook instead of a created hook.

@atmar

This comment has been minimized.

Show comment
Hide comment
@atmar

atmar Feb 26, 2018

@leahciMic This doesn't work for me. Gives a lot of errors loading other components and breaks the site. Also receiving 502 error when navigating to other pages besides homepage
image

atmar commented Feb 26, 2018

@leahciMic This doesn't work for me. Gives a lot of errors loading other components and breaks the site. Also receiving 502 error when navigating to other pages besides homepage
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment