InfluxDB + Grafana vs. MySQL + rrd4j

It seems that the connection from OH2 to the InfluxDB is timing out…
Post your /etc/openhab2/services/influxdb.cfg to check it
Does anything gets stored and sometimes you get timeouts or it simply doesn’t work at all?

I’ve got data in the InfluxDB, but it seams as if the persistence service regularly runs into a timeout. (About every 10 to 30 minutes, ~80 times last night)

This is my influxdb.cfg:

# The database URL, e.g. http://127.0.0.1:8086 or https://127.0.0.1:8084 .
# Defaults to: http://127.0.0.1:8086
url=http://127.0.0.1:8086

# The name of the database user, e.g. openhab.
# Defaults to: openhab
user=openhab

# The password of the database user.
password=openhab

# The name of the database, e.g. openhab.
# Defaults to: openhab
db=openhab_db

Any idea what could cause this problem?

Edit: I just found the corresponding error in the InfluxDB log:

Feb  6 10:40:27 OpenHabian01 influxd[402]: [httpd] 127.0.0.1 - openhab [06/Feb/2017:10:40:17 +0100] "POST /write?consistency=one&db=openhab_db&p=%5BREDACTED%5D&precision=n&rp=autogen&u=openhab HTTP/1.1" 500 44 "-" "okhttp/2.4.0" 44d639f5-ec50-11e6-9ddb-000000000000 10003606

Could the problem be the slow sd card disk speed of my Raspberry PI? Here is the output of my disk speed write test:

dd if=/dev/zero of=~/test.tmp bs=500K count=1024
1024+0 records in
1024+0 records out
524288000 bytes (524 MB) copied, 70.9448 s, 7.4 MB/s

Did you ever solve that? Have the same problem …

I think I solved the problem with a faster sd card, but I’m not sure anymore.

Thx. I’m running from an USB SSD, maybe it’s to slow … :joy:

@TheNetStriker Did you end up building these retention policies and continuous query’s? While disk space is not an issue, I run into memory issues on my RPi as the dataset grows. I am logging a very limited number of items (like 30 to 50), but at a fairly high frequency. After running for a few days, my RPi becomes unresponsive and only a hard reset will bring it back. Rather then moving influxDB to a server that will also consume power I want to see if I can solve the issue with some intelligent data pruning.

I’ve currently have no retention policy. My raspberry currently has a ram usage of 85%. The influxdb process is currently using 15% of the memory. I’am also tracking the memory usage of the raspberry and I also saw a few times that the memory usage was at this level, but before it hits 100% it dropped every time and then began to rise again. I will monitor the memory usage over the next few days.

Hi Jürgen,

is this still true?
I am wondering if it would make sense to switch from jdbc and n3 to InfluxDB and Grafana, but I don’t see an advantage.
The only thing which I don’t like about n3 is, that the x-axis values usually overlap, so that they are not readable on my cell phone (iPhone 7+).

rrd4j and n3 remain my persistance/chart bundle.

Thanks a lot!
So you are a “Nordlicht” as well :wink:

On PC the graphs look good, but on my phone I can barely read the scale:
grafik

I did not find how to configure the x- axis (just the y-axis with “ticks”)

Moin Moin😉
Screenshot was from my phone (forgot to tell).

Moin :slight_smile:
But I assume your’s in landscape mode?!

In landscape mode my x-axis looks good as well, but not in portrait mode.
But that’s a minor thing.
Thanks four your reponse.