Closed boneskull closed 8 years ago
@boneskull I recommend checking out this article - it has some excellent tips for tracking down Node memory leaks.
The first dependency it mentions, memwatch
, unfortunately isn't compiling properly but I was able to use heapdump
myself and view the status of the Heap within Chrome after scp
ing the snapshot to myself. You could take snapshots at a regular interval and then once the script crashes, download the snapshot and inspect it. That should get you to the source of the leak.
Do you have a schematic or diagram for the custom module? I'd like to try my hand at assembling that.
I'm guessing it may be a memory leak.
By your description, I agree. I will be traveling this weekend, but will take time to try and repro as soon as I can
A design question: what is the motivation for using a TMP36 and BMP180? The BMP180 provides both temp and pressure; it will also always be more accurate than the TMP36.
@rwaldron I couldn't get accurate temperature readings from the BMP180. I am not sure why. It is reading 4-5 F higher than it should. I figured it was just a bad module. The TMP36 is a little better.
I should give it a shot attached to an arduino or something to eliminate T2 as the culprit. Thereafter I should use C instead of J5 if it's still having problems.
Can you do a run without losant-sdk-js
and report the outcome?
Also, if you're only reading every 20 seconds, you can optimize the entire program by changing the actual sampling interval rate: http://johnny-five.io/examples/board-sampling-interval/
Closing this for now as there are no action items.
So I have a script pushed to my T2. It periodically reads sensor values and transmits them.
It does this successfully for about 48 hours, then stops. This happens consistently. I know it has stopped when the 3 leds which were constanly on (PortA, Power, PortB) become one (Power).
I can include the script itself here, but what I'm really curious about is finding out how and why it crashes. Given that it happens after a pretty regular amount of time, I'm guessing it may be a memory leak.