It took a couple of days, but I managed to solve the problem that occurred on Jan 5, though not clear what exactly the problem was (and while writing this update, discovered that the problem was not really solved).
The cause of the problem was likely one of the following or maybe both:
- Free disk space on my disk where node-red is installed went down to almost zero;
- Deploy problem due to an invalid/wrong/broken/etc node.
Today I got the UI flow editor up again. Since I am using the project feature, I can now look back at all changes made so far. However, I didn't see any date/time stamps in the project history database and hence I have no idea what the last changes were before node-red crashed on Jan 4.
Can anyone point me to documentation for using the project history database?
Unfortunately I ran today into a similar problem as before. After hitting the deploy key it grayed out and showed a wave indicating busy as on Jan 4.
Anyway, what I did until the moment node-red came up again today, was the following:
(BTW I regularly tested after a (set of) changes if node-red was working again.)
-
Creating plenty of available free disk space, it took me more than a week, because I wanted to make some other configuration changes as well and implementing another backup method. However this didn't bring up node-red again. Starting Jan 12 I decided to have a more detailed look at node-red and did some tests.
-
Copied .node-red folder to save it in case its getting more worse and data will be damaged/destroyed.
-
Imported the project flow in my old node-red system (v0.18.4) on Windows10, which doesn't support projects. I was happily surprised that I could import the flows, as it showed that the flows are correctly configured and I have now a working copy of the flows.
-
Checked the versions of my current node-red system on Linux:
0 linux: 4.15.0-43
0 node: v8.15.0
0 npm: v6.4.1
0 node-red: v0.19.5
0 dashboard: v2.11.0
-
Upgrading node-red, as follows:
sudo npm install -g --unsafe-perm node-red
[sudo] password for leo:
npm WARN deprecated mailparser@0.6.2: Mailparser versions older than v2.3.0 are deprecated
npm WARN deprecated nodemailer@1.11.0: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated mimelib@0.3.1: This project is unmaintained
npm WARN deprecated mailcomposer@2.1.0: This project is unmaintained
npm WARN deprecated buildmail@2.0.0: This project is unmaintained
/usr/bin/node-red-pi -> /usr/lib/node_modules/node-red/bin/node-red-pi
/usr/bin/node-red -> /usr/lib/node_modules/node-red/red.js
- node-red@0.19.5
added 1 package from 1 contributor, removed 3 packages and updated 10 packages in 24.716s
node-red UI Still not working and finally crashes.
-
Checked for 'outdated' nodes and upgraded them (3 nodes)
-
Cleaning NPM cache, as follows:
sudo npm cache clean --force
[sudo] password for leo:
npm WARN using --force I sure hope you know what you are doing.
-
NPM rebuild. Successful, 130 lines of output.
-
Tried node-red start parameters, such as defining port number, node-red directory, etc. Nothing helped.
-
NPM doctor. No problem reported, however suggesting higher versions of npm and node.
-
Deleting nodes, that I am not using anymore, 8 in total.
At this point, the node-red editor came up again, however not all problems solved as turned out later. One node was still used (dead-man-switch), so I tried to reinstall, but it didn't work and decided to delete that node. Anyway after a while node-red crashed again, but the crash log differs from the ones before. See below copy.
node-red start
13 Jan 12:15:13 - [info]
Welcome to Node-RED
13 Jan 12:15:13 - [info] Node-RED version: v0.19.5
13 Jan 12:15:13 - [info] Node.js version: v8.15.0
13 Jan 12:15:13 - [info] Linux 4.15.0-43-generic x64 LE
13 Jan 12:15:13 - [info] Loading palette nodes
13 Jan 12:15:13 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
13 Jan 12:15:13 - [warn] rpi-gpio : Cannot find Pi RPi.GPIO python library
13 Jan 12:15:14 - [info] Dashboard version 2.11.0 started at /ui
13 Jan 12:15:14 - [warn] Missing node modules:
13 Jan 12:15:14 - [warn] - node-red-contrib-bigtimer (2.0.8): bigtimer
13 Jan 12:15:14 - [warn] - node-red-contrib-blindcontroller (4.6.0): blindcontroller, multiblindcontroller
13 Jan 12:15:14 - [warn] - node-red-contrib-internetattv (0.1.6): internetAtTv
13 Jan 12:15:14 - [warn] - node-red-contrib-newsamsungtv (0.1.0): newSamsungTV, new-samsung-tv-isalive
13 Jan 12:15:14 - [warn] - node-red-contrib-deadmanswitch (1.0.1): dead-man-switch
13 Jan 12:15:14 - [warn] - node-red-contrib-message-counter (1.0.1): Message Counter
13 Jan 12:15:14 - [info] Removing modules from config
13 Jan 12:15:14 - [info] Settings file : /home/leo/.node-red/settings.js
13 Jan 12:15:14 - [info] Context store : 'default' [module=memory]
13 Jan 12:15:14 - [info] User directory : /home/leo/.node-red
13 Jan 12:15:14 - [info] Server now running at http://127.0.0.1:1880/
13 Jan 12:15:14 - [info] Active project : GateManager
13 Jan 12:15:14 - [info] Flows file : /home/leo/.node-red/projects/GateManager/flows_LT03X.json
13 Jan 12:15:14 - [info] Waiting for missing types to be registered:
13 Jan 12:15:14 - [info] - dead-man-switch
13 Jan 14:26:03 - [info] Stopping modified flows
13 Jan 14:26:03 - [info] Stopped modified flows
13 Jan 14:26:03 - [info] Waiting for missing types to be registered:
13 Jan 14:26:03 - [info] - dead-man-switch
13 Jan 14:27:20 - [info] Installing module: node-red-contrib-deadmanswitch, version: 1.0.1
13 Jan 14:27:26 - [info] Installed module: node-red-contrib-deadmanswitch
13 Jan 14:27:26 - [info] Missing type registered: dead-man-switch
13 Jan 14:27:26 - [info] Starting flows
13 Jan 14:27:26 - [info] Started flows
<--- Last few GCs --->
[2264:0x2ac2700] 8497851 ms: Mark-sweep 1446.5 (1507.2) -> 1446.5 (1476.2) MB, 948.0 / 0.0 ms (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 948 ms) last resort GC in old space requested
[2264:0x2ac2700] 8499037 ms: Mark-sweep 1446.5 (1476.2) -> 1446.5 (1476.2) MB, 1185.6 / 0.0 ms last resort GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x33a2f4f258b9
0: builtin exit frame: stringify(this=0x33a2f4f18371 ,0x33a2f4f7c651 <String[1]: >,0x2f965abfef01 <JSFunction (sfi = 0x7c840df6c21)>,0x2f965abfeca1 )
1: encodeObject [/usr/lib/node_modules/node-red/red/runtime/util.js:~463] [pc=0x71b5db64018](this=0x1139b4173429 <Object map = 0x1ad59f1fcd81>,msg=0x213e1a5d8f09 <Object map = 0x37e...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [node-red]
2: 0x8ccf9c [node-red]
3: v8::Utils::ReportOOMFailure(char const*, bool) [node-red]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node-red]
5: v8::internal::NewTransitionArray(int) [node-red]
6: v8::internal::TransitionsAccessor::Insert(v8::internal::Handlev8::internal::Name, v8::internal::Handlev8::internal::Map, v8::internal::SimpleTransitionFlag) [node-red]
7: v8::internal::ConnectTransition(v8::internal::Handlev8::internal::Map, v8::internal::Handlev8::internal::Map, v8::internal::Handlev8::internal::Name, v8::internal::SimpleTransitionFlag) [node-red]
8: v8::internal::CopyReplaceDescriptors(v8::internal::Handlev8::internal::Map, v8::internal::Handlev8::internal::DescriptorArray, v8::internal::Handlev8::internal::LayoutDescriptor, v8::internal::TransitionFlag, v8::internal::MaybeHandlev8::internal::Name, char const*, v8::internal::SimpleTransitionFlag) [node-red]
9: v8::internal::CopyAddDescriptor(v8::internal::Handlev8::internal::Map, v8::internal::Descriptor*, v8::internal::TransitionFlag) [node-red]
10: v8::internal::CopyWithField(v8::internal::Handlev8::internal::Map, v8::internal::Handlev8::internal::Name, v8::internal::Handlev8::internal::FieldType, v8::internal::PropertyAttributes, v8::internal::PropertyConstness, v8::internal::Representation, v8::internal::TransitionFlag) [node-red]
11: v8::internal::TransitionToDataProperty(v8::internal::Handlev8::internal::Map, v8::internal::Handlev8::internal::Name, v8::internal::Handlev8::internal::Object, v8::internal::PropertyAttributes, v8::internal::PropertyConstness, v8::internal::Object::StoreFromKeyed, bool*) [node-red]
12: v8::internal::LookupIterator::PrepareTransitionToDataProperty(v8::internal::Handlev8::internal::JSObject, v8::internal::Handlev8::internal::Object, v8::internal::PropertyAttributes, v8::internal::Object::StoreFromKeyed) [node-red]
13: v8::internal::Object::AddDataProperty(v8::internal::LookupIterator*, v8::internal::Handlev8::internal::Object, v8::internal::PropertyAttributes, v8::internal::Object::ShouldThrow, v8::internal::Object::StoreFromKeyed) [node-red]
14: v8::internal::JSObject::AddProperty(v8::internal::Handlev8::internal::JSObject, v8::internal::Handlev8::internal::Name, v8::internal::Handlev8::internal::Object, v8::internal::PropertyAttributes) [node-red]
15: v8::internal::JsonStringifier::ApplyReplacerFunction(v8::internal::Handlev8::internal::Object, v8::internal::Handlev8::internal::Object, v8::internal::Handlev8::internal::Object) [node-red]
16: v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_(v8::internal::Handlev8::internal::Object, bool, v8::internal::Handlev8::internal::Object) [node-red]
17: v8::internal::JsonStringifier::Stringify(v8::internal::Handlev8::internal::Object, v8::internal::Handlev8::internal::Object, v8::internal::Handlev8::internal::Object) [node-red]
18: v8::internal::Builtin_JsonStringify(int, v8::internal::Object**, v8::internal::Isolate*) [node-red]
19: 0x71b5d80697d
Aborted (core dumped)
So I am back at where I started on Jan 5.
What's new is the following message:
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
What can be done to increase heap size or any other measure?
Anyone understands what's going on, how to solve this problem, or can tell me if it makes sense to remove all node-red and npm stuff and install from scratch?
Even removing all stuff seems not to be an easy job, I read in some posts!
Thanks, Leo