CircuitSetup / Split-Single-Phase-Energy-Meter

Split Single-phase Energy Meter
https://www.crowdsupply.com/circuitsetup/split-single-phase-energy-meter
MIT License
261 stars 57 forks source link

Using web interface and/or leaving it open causes ESP32 memory leak/crash #6

Closed CircuitSetup closed 4 years ago

CircuitSetup commented 4 years ago

I think I might have found something, I noticed my energy meter crashing may be caused by having it's web page open in multiple tabs, it happened again yesterday when I didn't realize I already had a tab open in chrome, and opened another one, about 20 minutes later my meter dropped off the network.

I use an app for work called sysdweb to control systemd services, and when multiple users logged it it would crash similarly, probably no fix for it, but figured I'd offer the info.

I tried it again this morning, and 12 minutes later it crashed on me, and I needed to reboot it.

I ended up buying an internet switch so I can bounce it from anywhere.

Originally posted by @jreiners in https://github.com/CircuitSetup/Split-Single-Phase-Energy-Meter/issues/4#issuecomment-535126441

CircuitSetup commented 4 years ago

Split this into a new issue.

Recent updates to AsyncTCP: https://github.com/me-no-dev/AsyncTCP/pull/67 and ESPAsyncWebserver: https://github.com/me-no-dev/ESPAsyncWebServer/pull/591

Should solve this problem. Testing shortly...

CircuitSetup commented 4 years ago

According to the ESPAsyncWebServer fix, it may also cause a crash if you:

Doesn't matter if you close the browser or not, the session wasn't being closed properly in all cases, which would result in a memory leak and eventually cause a crash.

jreiners commented 4 years ago

Ahh nice catch, I always use Chrome.

CircuitSetup commented 4 years ago

Okay, this is fixed with v2.5.3 https://github.com/CircuitSetup/Split-Single-Phase-Energy-Meter/releases/tag/2.5.3

jreiners commented 4 years ago

Thanks, I'll check it out.

Justin Reiners Reiners Cloud Consulting LLC I'm happy to be your local Omaha distributor for 3CX and SimpleHelp! Contact me for info.

On Fri, Sep 27, 2019 at 12:10 PM John notifications@github.com wrote:

Closed #6 https://github.com/CircuitSetup/Split-Single-Phase-Energy-Meter/issues/6 .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CircuitSetup/Split-Single-Phase-Energy-Meter/issues/6?email_source=notifications&email_token=AB4PG7EAZK6D226H6D4EZUTQLY47PA5CNFSM4I22UQS2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOT4NLWAA#event-2669329152, or mute the thread https://github.com/notifications/unsubscribe-auth/AB4PG7FFXADXKJSL3M4HWY3QLY47PANCNFSM4I22UQSQ .