I have an ESP8266 that sends data from the DHT22 sensor to node-red via MQTT. I have also installed the buienradar node.
Node-red stopped last 2 nights. In the log I first see these lines 6x in a time of 10 minutes:
18 May 01:19:34 - [error] [influxdb out: af18d328.370628] Error: No host available
18 May 01:20:17 - [info] [mqtt-broker: c156527e.9bbc] Disconnected from broker: mqtt: // localhost: 58073
18 May 01:20:24 - [info] [rain radar: 90709958.14d448] Failed: Error: socket hang up
18 May 01:20:28 - [error] [influxdb out: b28e327d.6cda28] Error: Request timed out
18 May 01:21:11 - [info] [mqtt-broker: c156527e.9bbc] Connected to broker: mqtt: // localhost: 58073
Then these rules:
<--- Last few GCs --->
[1062: 0x3524070] 58010218 ms: Scavenge 54.0 (60.0) -> 53.5 (60.0) MB, 775.8 / 106.6 ms allocation failure
[1062: 0x3524070] 58150080 ms: Scavenge 54.3 (60.0) -> 53.7 (60.0) MB, 1102.6 / 59.8 ms allocation failure
[1062: 0x3524070] 58156052 ms: Scavenge 54.4 (60.0) -> 54.0 (60.5) MB, 813.6 / 69.3 ms allocation failure
[1062: 0x3524070] 58230168 ms: Scavenge 54.7 (60.5) -> 54.3 (60.5) MB, 3227.0 / 320.9 ms allocation failure
then i get this:
==== JS stack trace ================================================
Security context: 0x31bc451a5891
1: / * anonymous * / [/home/jde/.node-red/node_modules/xpath/xpath.js:~1678] [pc = 0xd25047422c4] (this = 0x20ed5674c0b9 , c = 0x20ed5674datext1 )
2: / * anonymous * / [/home/jde/.node-red/node_modules/xpath/xpath.js:~1678] [pc = 0xd2504741b0b] (this = 0x20ed5674d269 , c = 0x20ed5674d979 <XP folder = 0x26d47 ...
FATAL ERROR: Committing semi space failed. Allocation failed - process out of memory
1: node :: Abort () [node-red]
2: 0x8cd14c [node-red]
3: v8 :: Utils :: ReportOOMFailure (char const *, bool) [node-red]
4: v8 :: internal :: V8 :: FatalProcessOutOfMemory (char const *, bool) [node-red]
5: v8 :: internal :: Heap :: PerformGarbageCollection (v8 :: internal :: GarbageCollector, v8 :: GCCallbackFlags) [node-red]
6: v8 :: internal :: Heap :: CollectGarbage (v8 :: internal :: AllocationSpace, v8 :: internal :: GarbageCollectionReason, v8 :: GCCallbackFlags) [node-red]
7: v8 :: internal :: Factory :: NewFillerObject (int, bool, v8 :: internal :: AllocationSpace) [node-red]
8: v8 :: internal :: Runtime_AllocateInNewSpace (int, v8 :: internal :: Object **, v8 :: internal :: Isolate *) [node-red]
9: 0xd2503f042fd
Around 3:48 PM node-red will stop again this time with this message
[xmldom error] invalid document source
@ # [line: 0, col: undefined]
18 May 15:48:39 - [red] Uncaught Exception:
18 May 15:48:39 - TypeError: Cannot read property 'nodeType' or undefined
at PathExpr.evaluate
(/home/jde/.node-red/node_modules/xpath/xpath.js:1716:17)
at XPath.evaluate
(/home/jde/.node-red/node_modules/xpath/xpath.js:1220:25)
at XPathExpression.evaluate
(/home/jde/.node-red/node_modules/xpath/xpath.js:4250:26)
at Object.exports.selectWithResolver
(/home/jde/.node-red/node_modules/xpath/xpath.js:4667:26)
at Object.exports.select
(/home/jde/.node-red/node_modules/xpath/xpath.js:4647:17)
at IncomingMessage.
(/home/jde/.node-red/node_modules/node-red-contrib-buienradar/buienradar.js:72:39)
at emitNone (events.js: 111: 20)
at IncomingMessage.emit (events.js: 208: 7)
at endReadableNT (_stream_readable.js: 1064: 12)
at _combinedTickCallback (internal / process / next_tick.js: 139: 11)
This also corresponds to what the VPS statistics show.
This is my set-up for node-red:
The json node action is: convert between json string & object
The function after buienradar
msg.payload = {temperature:
Number (msg.payload.buienradar.temperatureGC), rv:
Number (msg.payload.buienradar.lucht Humidity)}
return msg
The data:
MQTT: {"temperature": 20.10, "humidity": 57.40, "location": 1}
Buienradar:
{"buienradar": {"station code": "6270", "station name": "Measuring station
Leeuwarden "," date ":" 05/18/2019
15:40:00 "," humidity ":" 62 "," temperatureGC ":" 19.1 "," wind speedMS ":" 3.2 "," wind speedBF ":" 2 "," wind directionGR ":" 302 "," wind direction " : "WNW", "air pressure": "1006.3", "sight gauges": "14700", "gustsMS": "5.4", "rainMMPU": "-", "sun intensityWM2": "437", "iconactueel": " "," iconzin ":" Heavy
cloudy"}}
is there someone how can help me?