Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BROKER_REAL_TIME=1 causes crashes in the INFLUXDB module #2044

Closed
mcspr opened this issue Dec 6, 2019 · 4 comments · Fixed by #2061
Closed

BROKER_REAL_TIME=1 causes crashes in the INFLUXDB module #2044

mcspr opened this issue Dec 6, 2019 · 4 comments · Fixed by #2061
Labels
broker Internal messaging subsystem bug influxdb
Milestone

Comments

@mcspr
Copy link
Collaborator

mcspr commented Dec 6, 2019

The problem is with POW R2, it crashes few minutes after reboot when BROKER_REAL_TIME is set to 1. In web debug i see INFLUXDB messages in every 5-6 seconds.

Originally posted by @MihataBG in #1968 (comment)


90% certain this is related to the issue with ESPAsyncTCP, fixed by the me-no-dev/ESPAsyncTCP@75c2513

I don't really remember why exactly I skipped the update, besides the ASYNC SSL build problem. Need to reassess this again.
Or, do things like #1806 and just use AsyncClient directly.

@mcspr mcspr added broker Internal messaging subsystem bug influxdb labels Dec 6, 2019
@mcspr mcspr added this to the 1.14.1 milestone Dec 9, 2019
@MihataBG
Copy link

MihataBG commented Dec 10, 2019

Also have a problem with INFLUXDB on "magichome-led-controller". I tried with BROKER_REAL_TIME=0 but module restart itself when do INFLUXDB message.

@kordian-kowalski
Copy link

kordian-kowalski commented Dec 12, 2019

Same here, enabling InfluxDB will crash a Wemos D1 mini after sending a couple of measurements, and I'm also seeing the measurements being sent more like every 6 seconds rather than 10 that I set up.

@mcspr
Copy link
Collaborator Author

mcspr commented Dec 13, 2019

Right, previous version only sent influx message each sensor report, while BROKER_REALTIME=1 now makes it every reading.
Considering I already broke broker apart, I wonder if it is also viable to just remove REALTIME flag altogether and just have SensorReportBroker and SensorReadingBroker and make influx subscribe to report one.

Problem with SyncClient that I mentioned previously is quite random and depends on how well network behaves, sending things too frequently shows it is thoroughly broken. See me-no-dev/ESPAsyncTCP#115 explanation, but we need to throw out old SSL stuff first.
upd: I wish Core's HTTP client had any request argument stuff :/ But leaning to adapting Thingspeak logic / #1909

@mcspr
Copy link
Collaborator Author

mcspr commented Dec 16, 2019

#2061 reverts to the old behaviour and sends data every report, please check again with the current dev build

There are also two additional changes:

  • string measurements are quoted
  • http request now sends multiple measurements instead of one at a time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
broker Internal messaging subsystem bug influxdb
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants