interactiveinstitute / elvis

Educational tool for measuring energy usage with Fibaro Wall Plugs on Raspberry Pi
https://www.tii.se/projects/energy-in-a-box-at-komtek
GNU General Public License v3.0
3 stars 0 forks source link

Investigate reset issue #41

Closed sander closed 10 years ago

sander commented 10 years ago

@rebekahlolsen wrote:

Once the pie chart was done it and displayed the total time, we tried to reset to start over and pressing the button did not work. I assume this problem only happens when the chart is filled and done. […] We will test the reset function in the middle of the measure to see if it works.

and:

fix the reset problems (this seems to be sporadic. We tested 4 times. 2 times it locked up at the end, and 2 times it was fine. We think it might be the duration of time after the pie chart is filled. The longer it sits it locks up. This may just be coincidence, but both times it locked up it sat in the finished state for more than an hour.

I wrote:

I’m not sure about the reset problems but will try. Let me know if you discover a way to consistently reproduce the circumstances.

sander commented 10 years ago

I’ve tried keeping the visualisation in Summary mode for an hour without interaction. The reset button still worked for me. Some technical findings:

I think this suggests a memory leak (e.g. faulty code that uses more RAM over time), but am not sure about how Python manages memory. @Anton04 do you have an idea? Could we just use the monit script to restart the Python server when it uses too much?

I can’t find leaks in my code, but the Tornado release notes indicate that some old versions have memory leaks. We were using 2.4.0.1 and I’ve just updated the prototype to Tornado 3.1.1. @rebekahlolsen could you test whether this reset problem still occurs with the latest version?

If we can’t fix this in time, maybe a recommendation in the user manual should be to reboot (power off and on) the Raspberry Pi when it stops working.