Jarli01 / xenorchestra_installer

A simple install script for Xen Orchestra
GNU General Public License v3.0
422 stars 86 forks source link

Node heap limit reached #44

Closed ldejavul closed 5 years ago

ldejavul commented 5 years ago

Expected Behavior

yarn build


Actual Behavior

Successfully compiled 120 files with Babel.

<--- Last few GCs --->

[17237:0xab9b5f8] 270484 ms: Mark-sweep 638.7 (706.4) -> 638.7 (706.4) MB, 1292.0 / 0.0 ms allocation failure GC in old space requested [17237:0xab9b5f8] 271860 ms: Mark-sweep 638.7 (706.4) -> 638.7 (703.4) MB, 1375.7 / 0.0 ms last resort GC in old space requested [17237:0xab9b5f8] 272867 ms: Mark-sweep 638.7 (703.4) -> 638.7 (702.9) MB, 1006.9 / 0.0 ms last resort GC in old space requested

<--- JS stacktrace --->

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

Security context: 0x24116201 0: builtin exit frame: parse(this=0x2410f6ad ,0x2a541ca1 <Very long string[26862135]>)

1: /* anonymous */(aka /* anonymous */) [/opt/xen-orchestra/node_modules/gulp-uglify/lib/minify.js:71] [bytecode=0x57f76d41 offset=351](this=0x4a48417d <undefined>,file=0x2c244a41 <File map = 0x5687f679>)
2: _transform [/opt/xen-orchestra/node_modules/gulp-uglify/composer.js:1...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory 1: node::Abort() [gulp build] 2: 0x84c5c66 [gulp build] 3: v8::Utils::ReportOOMFailure(char const, bool) [gulp build] 4: v8::internal::V8::FatalProcessOutOfMemory(char const, bool) [gulp build] 5: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [gulp build] 6: v8::internal::Handle v8::internal::JsonParser::SlowScanJsonString<v8::internal::SeqTwoByteString, unsigned short>(v8::internal::Handle, int, int) [gulp build]

Confirm XOCE services are running

● xo-server.service - XO Server Loaded: loaded (/lib/systemd/system/xo-server.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2019-03-11 01:40:25 CDT; 2min 58s ago Main PID: 17356 (node) Tasks: 16 (limit: 4915) CGroup: /system.slice/xo-server.service ├─17356 /usr/local/bin/node ./bin/xo-server └─17372 /usr/bin/node /opt/xen-orchestra/node_modules/jest-worker/build/workers/processChild.js

Mar 11 01:42:49 XOACE xo-server[17356]: CallSite {}, Mar 11 01:42:49 XOACE xo-server[17356]: CallSite {} ] } Mar 11 01:42:49 XOACE xo-server[17356]: xo-server-cloud: next attempt in 1023 ms Mar 11 01:42:50 XOACE xo-server[17356]: xo-server-cloud: next attempt in 1044 ms Mar 11 01:42:51 XOACE xo-server[17356]: xo-server-cloud: next attempt in 1937 ms Mar 11 01:42:53 XOACE xo-server[17356]: xo-server-cloud: next attempt in 3136 ms Mar 11 01:42:56 XOACE xo-server[17356]: xo-server-cloud: next attempt in 4828 ms Mar 11 01:43:01 XOACE xo-server[17356]: xo-server-cloud: next attempt in 8127 ms Mar 11 01:43:09 XOACE xo-server[17356]: xo-server-cloud: next attempt in 13516 ms Mar 11 01:43:23 XOACE xo-server[17356]: xo-server-cloud: next attempt in 21818 ms

Provide the output of journalctl logs

Mar 11 01:41:23 XOACE xo-server[17356]: xo-server-cloud: next attempt in 33089 ms Mar 11 01:41:56 XOACE xo-server[17356]: xo-server-cloud: next attempt in 52931 ms Mar 11 01:42:49 XOACE xo-server[17356]: xo-server-cloud: fail to connect to updater { ConnectionError: connect ECONNREFUSED 127.0.0.1:9001 Mar 11 01:42:49 XOACE xo-server[17356]: at /opt/xen-orchestra/node_modules/jsonrpc-websocket-client/src/websocket-client.js:193:16 Mar 11 01:42:49 XOACE xo-server[17356]: at tryCatcher (/opt/xen-orchestra/node_modules/bluebird/js/release/util.js:16:23) Mar 11 01:42:49 XOACE xo-server[17356]: at Promise._settlePromiseFromHandler (/opt/xen-orchestra/node_modules/bluebird/js/release/promise.js:512:31) Mar 11 01:42:49 XOACE xo-server[17356]: at Promise._settlePromise (/opt/xen-orchestra/node_modules/bluebird/js/release/promise.js:569:18) Mar 11 01:42:49 XOACE xo-server[17356]: at Promise._settlePromise0 (/opt/xen-orchestra/node_modules/bluebird/js/release/promise.js:614:10) Mar 11 01:42:49 XOACE xo-server[17356]: at Promise._settlePromises (/opt/xen-orchestra/node_modules/bluebird/js/release/promise.js:690:18) Mar 11 01:42:49 XOACE xo-server[17356]: at _drainQueueStep (/opt/xen-orchestra/node_modules/bluebird/js/release/async.js:138:12) Mar 11 01:42:49 XOACE xo-server[17356]: at _drainQueue (/opt/xen-orchestra/node_modules/bluebird/js/release/async.js:131:9) Mar 11 01:42:49 XOACE xo-server[17356]: at Async._drainQueues (/opt/xen-orchestra/node_modules/bluebird/js/release/async.js:147:5) Mar 11 01:42:49 XOACE xo-server[17356]: at Immediate.Async.drainQueues (/opt/xen-orchestra/node_modules/bluebird/js/release/async.js:17:14) Mar 11 01:42:49 XOACE xo-server[17356]: at runCallback (timers.js:810:20) Mar 11 01:42:49 XOACE xo-server[17356]: at tryOnImmediate (timers.js:768:5) Mar 11 01:42:49 XOACE xo-server[17356]: at processImmediate [as _immediateCallback] (timers.js:745:5) Mar 11 01:42:49 XOACE xo-server[17356]: [Symbol(originalCallSite)]: Mar 11 01:42:49 XOACE xo-server[17356]: [ CallSite {}, Mar 11 01:42:49 XOACE xo-server[17356]: CallSite {}, Mar 11 01:42:49 XOACE xo-server[17356]: CallSite {} ], Mar 11 01:42:49 XOACE xo-server[17356]: [Symbol(mutatedCallSite)]: Mar 11 01:42:49 XOACE xo-server[17356]: [ CallSite { Mar 11 01:42:49 XOACE xo-server[17356]: constructor: [Function: CallSite], Mar 11 01:42:49 XOACE xo-server[17356]: getColumnNumber: [Function], Mar 11 01:42:49 XOACE xo-server[17356]: getEvalOrigin: [Object], Mar 11 01:42:49 XOACE xo-server[17356]: getFileName: [Function], Mar 11 01:42:49 XOACE xo-server[17356]: getFunction: [Object], Mar 11 01:42:49 XOACE xo-server[17356]: getFunctionName: [Object], Mar 11 01:42:49 XOACE xo-server[17356]: getLineNumber: [Function], Mar 11 01:42:49 XOACE xo-server[17356]: getMethodName: [Object], Mar 11 01:42:49 XOACE xo-server[17356]: getPosition: [Object], Mar 11 01:42:49 XOACE xo-server[17356]: getScriptNameOrSourceURL: [Function], Mar 11 01:42:49 XOACE xo-server[17356]: getThis: [Object], Mar 11 01:42:49 XOACE xo-server[17356]: getTypeName: [Object], Mar 11 01:42:49 XOACE xo-server[17356]: isConstructor: [Object], Mar 11 01:42:49 XOACE xo-server[17356]: isEval: [Object], Mar 11 01:42:49 XOACE xo-server[17356]: isNative: [Object], Mar 11 01:42:49 XOACE xo-server[17356]: isToplevel: [Object], Mar 11 01:42:49 XOACE xo-server[17356]: toString: [Function: CallSiteToString] }, Mar 11 01:42:49 XOACE xo-server[17356]: CallSite {}, Mar 11 01:42:49 XOACE xo-server[17356]: CallSite {} ] } Mar 11 01:42:49 XOACE xo-server[17356]: xo-server-cloud: next attempt in 1023 ms Mar 11 01:42:50 XOACE xo-server[17356]: xo-server-cloud: next attempt in 1044 ms Mar 11 01:42:51 XOACE xo-server[17356]: xo-server-cloud: next attempt in 1937 ms Mar 11 01:42:53 XOACE xo-server[17356]: xo-server-cloud: next attempt in 3136 ms Mar 11 01:42:56 XOACE xo-server[17356]: xo-server-cloud: next attempt in 4828 ms Mar 11 01:43:01 XOACE xo-server[17356]: xo-server-cloud: next attempt in 8127 ms Mar 11 01:43:09 XOACE xo-server[17356]: xo-server-cloud: next attempt in 13516 ms Mar 11 01:43:23 XOACE xo-server[17356]: xo-server-cloud: next attempt in 21818 ms Mar 11 01:43:45 XOACE xo-server[17356]: xo-server-cloud: next attempt in 34917 ms

Provide answers to these questions:

  • Is this a fresh install or an upgrade? Fresh install of server debian 9 only installed sudo ,curl and apt-get update

  • Version of XOCE server and web interface you're running new install

  • What OS is XOCE running on? Debian GNU/Linux 9 \n \l

  • What method you used to install XOCE (xo_install.sh, manual installation, etc)

sudo curl https://raw.githubusercontent.com/Jarli01/xenorchestra_installer/master/xo_install.sh | bash

  • What specific XOCE page you're on, and what specific element you're interacting with to trigger the error ssh with putty in user home directory
  • If a stacktrace is provided in the error, include that too. <--- JS stacktrace --->

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

Security context: 0x24116201 0: builtin exit frame: parse(this=0x2410f6ad ,0x2a541ca1 <Very long string[26862135]>)

1: /* anonymous */(aka /* anonymous */) [/opt/xen-orchestra/node_modules/gulp-uglify/lib/minify.js:71] [bytecode=0x57f        76d41 offset=351](this=0x4a48417d <undefined>,file=0x2c244a41 <File map = 0x5687f679>)
2: _transform [/opt/xen-orchestra/node_modules/gulp-uglify/composer.js:1...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory 1: node::Abort() [gulp build] 2: 0x84c5c66 [gulp build] 3: v8::Utils::ReportOOMFailure(char const, bool) [gulp build] 4: v8::internal::V8::FatalProcessOutOfMemory(char const, bool) [gulp build] 5: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [gulp build] 6: v8::internal::Handle v8::internal::JsonParser::SlowScanJsonString<v8::internal::SeqTwoByt eString, unsigned short>(v8::internal::Handle, int, int) [gulp build] 7: v8::internal::Handle v8::internal::JsonParser::SlowScanJsonString<v8::internal::SeqTwoByt eString, unsigned short>(v8::internal::Handle, int, int) [gulp build] 8: v8::internal::Handle v8::internal::JsonParser::SlowScanJsonString<v8::internal::SeqTwoByt eString, unsigned short>(v8::internal::Handle, int, int) [gulp build] 9: v8::internal::Handle v8::internal::JsonParser::SlowScanJsonString<v8::internal::SeqTwoByt eString, unsigned short>(v8::internal::Handle, int, int) [gulp build] 10: v8::internal::Handle v8::internal::JsonParser::SlowScanJsonString<v8::internal::SeqTwoByt eString, unsigned short>(v8::internal::Handle, int, int) [gulp build] 11: v8::internal::Handle v8::internal::JsonParser::SlowScanJsonString<v8::internal::SeqTwoByt eString, unsigned short>(v8::internal::Handle, int, int) [gulp build] 12: v8::internal::Handle v8::internal::JsonParser::SlowScanJsonString<v8::internal::SeqOneByt eString, unsigned char>(v8::internal::Handle, int, int) [gulp build] 13: v8::internal::Handle v8::internal::JsonParser::SlowScanJsonString<v8::internal::SeqOneByt eString, unsigned char>(v8::internal::Handle, int, int) [gulp build] 14: v8::internal::Handle v8::internal::JsonParser::SlowScanJsonString<v8::internal::SeqOneByt eString, unsigned char>(v8::internal::Handle, int, int) [gulp build] 15: v8::internal::Handle v8::internal::JsonParser::SlowScanJsonString<v8::internal::SeqOneByt eString, unsigned char>(v8::internal::Handle, int, int) [gulp build] 16: v8::internal::Handle v8::internal::JsonParser::SlowScanJsonString<v8::internal::SeqOneByt eString, unsigned char>(v8::internal::Handle, int, int) [gulp build] 17: v8::internal::Handle v8::internal::JsonParser::SlowScanJsonString<v8::internal::SeqOneByt eString, unsigned char>(v8::internal::Handle, int, int) [gulp build] 18: v8::internal::Handle v8::internal::JsonParser::SlowScanJsonString<v8::internal::SeqOneByt eString, unsigned char>(v8::internal::Handle, int, int) [gulp build] 19: v8::internal::Handle v8::internal::JsonParser::SlowScanJsonString<v8::internal::SeqOneByt eString, unsigned char>(v8::internal::Handle, int, int) [gulp build] 20: v8::internal::Handle v8::internal::JsonParser::SlowScanJsonString<v8::internal::SeqOneByt eString, unsigned char>(v8::internal::Handle, int, int) [gulp build] 21: v8::internal::Handle v8::internal::JsonParser::SlowScanJsonString<v8::internal::SeqOneByt eString, unsigned char>(v8::internal::Handle, int, int) [gulp build] 22: v8::internal::Handle v8::internal::JsonParser::SlowScanJsonString<v8::internal::SeqOneByt eString, unsigned char>(v8::internal::Handle, int, int) [gulp build] 23: v8::internal::Handle v8::internal::JsonParser::SlowScanJsonString<v8::internal::SeqOneByt eString, unsigned char>(v8::internal::Handle, int, int) [gulp build] 24: v8::internal::Handle v8::internal::JsonParser::SlowScanJsonString<v8::internal::SeqOneByt eString, unsigned char>(v8::internal::Handle, int, int) [gulp build] 25: v8::internal::Handle v8::internal::JsonParser::ScanJsonString() [gulp build] 26: v8::internal::JsonParser::ParseJsonValue() [gulp build] 27: v8::internal::JsonParser::ParseJsonArray() [gulp build] 28: v8::internal::JsonParser::ParseJsonValue() [gulp build] 29: v8::internal::JsonParser::ParseJsonObject() [gulp build] 30: v8::internal::JsonParser::ParseJsonValue() [gulp build] 31: v8::internal::JsonParser::ParseJson() [gulp build] 32: v8::internal::Builtin_JsonParse(int, v8::internal::Object*, v8::internal::Isolate) [gulp build] 33: 0x25e07efe 34: 0x42f870ed 35: 0x42f870ed 36: 0xa86cfd72 37: 0x51f4493c 38: 0x25e06d39 39: 0xa86cf908 40: 0x51f778db 41: 0xa86bbd60 42: 0x25e06d39 43: 0xa86e2941 44: 0x25e06d39 45: 0x42f870ed 46: 0xa86cfd72 47: 0x51f4493c 48: 0x25e06d39 49: 0x42f870ed 50: 0x51f778db 51: 0xa86bbd60 52: 0x25e06d39 53: 0x42f870ed 54: 0x42f870ed 55: 0x42f870ed 56: 0x25e06d39 57: 0x42f870ed 58: 0x42f870ed 59: 0x42f870ed 60: 0x42f870ed 61: 0xa86ccca3 62: 0xa86c93ab 63: 0x25e06d39 64: 0x42f870ed 65: 0x42f870ed 66: 0x51f758a5 67: 0xa869df58 68: 0x25e0615e 69: 0x25e06091 70: v8::internal::Execution::Call(v8::internal::Isolate, v8::internal::Handle, v8::internal::Handle , int, v8::internal::Handle) [gulp build] 71: v8::Function::Call(v8::Local, v8::Local, int, v8::Local) [gulp build] 72: v8::Function::Call(v8::Local, int, v8::Local) [gulp build] 73: node::InternalCallbackScope::Close() [gulp build] 74: node::InternalMakeCallback(node::Environment, v8::Local, v8::Local, int, v8::Local, node::async_context) [gulp build] 75: node::AsyncWrap::MakeCallback(v8::Local, int, v8::Local) [gulp build] 76: 0x84fcbcf [gulp build] 77: 0x85cc2f8 [gulp build] 78: 0x85cfdb7 [gulp build] 79: 0x85e1153 [gulp build] 80: uv_run [gulp build] 81: node::Start(uv_loop_s, int, char const const, int, char const const) [gulp build] 82: node::Start(int, char**) [gulp build] 83: main [gulp build] 84: __libc_start_main [/lib/i386-linux-gnu/libc.so.6] Aborted

  • xo-web:build − Error: 134 ✖ 1 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. Created symlink /etc/systemd/system/multi-user.target.wants/xo-server.service → /lib/systemd/system/xo-server.service.

Installation complete, open a browser to: 192.168.1.31

Default Login:admin@admin.net Password:admin

Don't forget to change your password!

  • Any errors that appear in your browser's error console. browser looks like it wants to load website but keeps spinning
  • Include what you've done so far in the installation, and if you got any error messages along the way. Only this error, its the same error as when I tried to do the source install. Its a heap size limit issue and I'm to dumb to figure it out. Spent an entire Sunday working this and was hoping it was fixed somewhere in your installer
  • Indicate whether or not you've manually edited any data directly. no
Jarli01 commented 5 years ago

How much ram does this system have?

ldejavul commented 5 years ago

8gig of system ram for the VM. My xen server has 64gb.

Jarli01 commented 5 years ago

Can you run node -v and past the output?

Node heap limits are generally because of a memory leak. You could try adjusting the node ram amount, but this shouldn't be required.

It might be a bug in the current version of node or an issue with Debian. I can't test the build at the moment but will do so in a few hours to test.

ldejavul commented 5 years ago

v8.15.1

If I could figure out how to adjust the node ram amount I would have but from my limited knowledge I need to run the .js with the command and since yarn build is doing everything I couldnt figure out where to change it.

Jarli01 commented 5 years ago

With 8GB of ram, there should be no issues at all. I regularly install with only 1024MB of ram and 1 vCPU

Corrected as I missed the key word "no"

ldejavul commented 5 years ago

I've gotten the same exact error in the same exact place with two different debian installs. Same version just hand installed. One using the install from source directions and then again with yours.

Jarli01 commented 5 years ago

I'm seeing the same issue with this version of node, which means that 8.15.1 broke something, yet again. . .

Danp2 commented 5 years ago

AFAICS, this doesn't affect Ubuntu builds.

Jarli01 commented 5 years ago

Have you built a new installation on 18.10? I'm testing again on deb 9.6 and was going to test on 18.10 as well.

ldejavul commented 5 years ago

So would there be an issue with rolling back to another node version?

Danp2 commented 5 years ago

I successfully built a new install on 18.04.

ldejavul commented 5 years ago

About to build on 18.04. Should I build on 18.10 instead?

Jarli01 commented 5 years ago

That is what I was going to try, but my system is taking forever. If you'd care to test ubuntu server 18.10 out and see if the issue persist there we can at least pinpoint this issue a bit more closely.

Jarli01 commented 5 years ago

About to build on 18.04. Should I build on 18.10 instead?

Current is usually what I test against, but 18.04 LTS isn't so far out of date as to be avoided.

ldejavul commented 5 years ago

Can verify 18.04 works. Guess I'm dumping debian.

Danp2 commented 5 years ago

You could try switching to an older version of node to see if that makes a difference. Also could open issue over on XO github to get input from developer.

Jarli01 commented 5 years ago

With 18.04 what version of node is installed @Danp2 and @ldejavul ?

ldejavul commented 5 years ago

v8.15.1. strange.

Jarli01 commented 5 years ago

So then it's an issue with Debian, likely with the newest LTS of node 8.15.* Likely Debian needs to update.

Closing this ticket for now.