sivann-tw / hiver-iot-kit-ble

this is a quick start sample codes for hiver ble modules using ble-shepehrd.js
MIT License
0 stars 2 forks source link

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory #3

Open mochechan opened 7 years ago

mochechan commented 7 years ago

==== C stack trace ===============================

(empty)

Hiver IoT starter Kit for BLE Application.

hiver-iot-kit-ble v:1.0.0 plugin-meter-relay v:1.0.0 plugin-gassensor v:1.0.1 plugin-weatherstation v:1.0.0 plugin-remotecontrol v:1.0.0 BLE Module Demo Option Menu.

   1.  Power Meter Relay       
   2.  Weather Station         
   3.  Gas Alarm               
   4.  Remote Controller       

Please key in your option [1-4] and hit enter: 2 2

Welcome to ble-shepherd World...

   ___   __    ____      ____ __ __ ____ ___   __ __ ____ ___   ___ 
  / _ ) / /   / __/____ / __// // // __// _ \ / // // __// _ \ / _ \
 / _  |/ /__ / _/ /___/_\ \ / _  // _/ / ___// _  // _/ / , _// // /
/____//____//___/     /___//_//_//___//_/   /_//_//___//_/|_|/____/ 
     A network server and manager for the BLE machine network

Author: Hedy Wang (hedywings@gmail.com) Version: ble-shepherd v:1.1.2 Document: https://github.com/bluetoother/ble-shepherd Copyright (c) 2016 Hedy Wang, The MIT License (MIT)

The server is up and running, press Ctrl+C to stop server.


Please power on your modules.

<--- Last few GCs --->

19634 ms: Mark-sweep 10.4 (247.3) -> 9.3 (241.3) MB, 145.9 / 0.1 ms [allocation failure] [GC in old space requested]. 19770 ms: Mark-sweep 9.3 (466.0) -> 9.3 (466.0) MB, 136.2 / 0.0 ms [allocation failure] [GC in old space requested]. 19912 ms: Mark-sweep 9.3 (690.8) -> 7.8 (687.8) MB, 141.4 / 0.0 ms [last resort gc]. 20039 ms: Mark-sweep 7.8 (687.8) -> 7.6 (685.8) MB, 127.2 / 0.0 ms [last resort gc].

<--- JS stacktrace --->

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

1: slowToString [buffer.js:459] [pc=0x5711e0ac] (this=0x4eae1d65 <an Uint8Array with map 0x74b11001>,encoding=0x34283ec1 <String[4]: utf8>,start=0,end=235647355)
2: arguments adaptor frame: 1->3
3: toString [buffer.js:492] [pc=0x5711d7b4] (this=0x4eae1d65 <an Uint8Array with map 0x74b11001>)
4: arguments adaptor frame: 1->0
5: tryToString(aka tryToString) [fs.js:451] [pc=0x5716ed24] (this=0x342081d9 <undefined>,buf=0x4...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory Aborted

npm ERR! Linux 4.4.38-v7+ npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start" npm ERR! node v6.9.4 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! hiver-iot-kit-ble@1.0.0 start: NODE_ENV=production node app npm ERR! Exit status 134 npm ERR! npm ERR! Failed at the hiver-iot-kit-ble@1.0.0 start script 'NODE_ENV=production node app'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the hiver-iot-kit-ble package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! NODE_ENV=production node app npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs hiver-iot-kit-ble npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls hiver-iot-kit-ble npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/pi/hiver-iot-kit-ble/npm-debug.log

EasonChangOP commented 7 years ago

It worked with raspberry in the same node version and I run it for many times. But it didn't show the same error. You can try this node --max_old_space_size=<size> yourNodeFile.js to change the memory limit. Maybe it worked after change it.