Hello Volks.
I have developed a Node red application and version control it on github. I have used the project feature and my version controlled files are like below:
[flows_raspberrymongo.json]
[flows_raspberrymongo_cred.json]
package.json
In my application I have used several nodes using configuration, for example mongodb nodes etc.My application work fin on the raspberry I have developed it on. I have set up a Digital Ocean environment for the later purpose of the application, and a remote mongo DB on another digital ocean instance (Firewall openingas and mongo users are check OK)
My problem is. When I clone my project on my "new digital ocean" instance, It hangs for minutes and spit out stack trace according to below. out of Memory ... Then I do som ekill -9 on the node red process, and start in "node-red --safe" and then I can modify my config setting on remote DB so it point correct. If I then deploy, my application start. All working fine (in the safe mode)access to DB and everything response quick.
BUT - as soon I try to start NR in normal mode, then It hangs again and crash...
I guess it has something to do with some configuration. Do I need to version control the _cred.json file? is the .config.json dynamically built up? what i the minimum I need to version control in git to get it up (if _cred fil is build up dinamically if I configure my mngodb2 node I have no problem with that...)
Thanks for help.
5 Mar 14:52:16 - [info] Starting flows
<--- Last few GCs --->
[26144:0x55aeb9d3c400] 73069 ms: Mark-sweep 263.6 (327.8) -> 263.5 (296.8) MB, 321.6 / 0.0 ms (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 449 ms) last resort GC in old space requested
[26144:0x55aeb9d3c400] 73530 ms: Mark-sweep 263.5 (296.8) -> 263.5 (296.8) MB, 461.5 / 0.0 ms last resort GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0xc171e798fe1
2: /* anonymous */ [/usr/local/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/index.js:350] [bytecode=0x8665d892749 offset=9](this=0x379fbf1880a9 ,nid=0x22fb187e9831 <String[14]: 2b29c038.1cfdb>)
3: arguments adaptor frame: 3->1
4: forEach(this=0x16e555ad791 <JSArray[159]>)
5: start [/usr/local/lib/node_modules/node-red/node_modules/@node...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [node-red]
2: 0x55aeb92f3011 [node-red]
3: v8::Utils::ReportOOMFailure(char const*, bool) [node-red]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node-red]
5: v8::internal::NewFixedArray(int, v8::internal::PretenureFlag) [node-red]
6: v8::internal::HashTable<v8::internal::NameDictionary, v8::internal::NameDictionaryShape>::New(v8::internal::Isolate*, int, v8::internal::PretenureFlag, v8::internal::MinimumCapacity) [node-red]
7: v8::internal::HashTable<v8::internal::NameDictionary, v8::internal::NameDictionaryShape>::EnsureCapacity(v8::internal::Handlev8::internal::NameDictionary, int, v8::internal::PretenureFlag) [node-red]
And - some restart it thows out DB exception...
2.xx.xxx:27017 timed out]
5 Mar 15:59:08 - [error] [mongodb2 in:insert] MongoError: failed to connect to server [165.22.xx.xxx:27017] on first connect [MongoError: connection 0 to 165.22.xx.xxx:27017 timed out]
5 Mar 15:59:08 - [error] [mongodb2 in:dynamic operation] MongoError: failed to connect to server [165.22.xx.xxx:27017] on first connect [MongoError: connection 0 to 165.22.xx.xxx:27017 timed out]
5 Mar 15:59:08 - [error] [mongodb2 in:dynamic operation] MongoError: failed to connect to server [165.22.xx.xxx:27017] on first connect [MongoError: connection 0 to 165.22.xx.xxx:27017 timed out]
... hundreds of them...
But, after doing trivial chnage like moving a log nod e2 mm and redeploy, everything works "again"