Discussion:
[influxdb] Too many open files - Raspberry 3
fanavity via InfluxData
2017-11-25 15:22:53 UTC
Permalink
Hi guys,

I hope you can help me. I have massive problems with my influxDb.

My hardware:

raspberryPi 3 with 16GB SD
openHabian OS
Services:

openhab2
homegear
influxDb
grafana
I want to store a few temperature values of my openhab installation in the database. The first three or four days I had no problems. If I now want to start the influxDB with the following command I get the o.g. Error:

/ usr / bin / influxd -config /etc/influxdb/influxdb.conf

Failed to open shard: 4: [shard 4] error opening file /influxdb/data/openhab_db/autogen/4/000000134-000000001.tsm: open /influxdb/data/openhab_db/autogen/4/000000134-000000001.tsm: too many open files service = store

The only special feature is that I save the data, meta and wal folder on a network drive.

What can I do to regain my temperature readings? Where is my mistake?

ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 7695
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 65536
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 7695
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
--
Remember to include the version number!
---
You received this message because you are subscribed to the Google Groups "InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/e2a3b6f0-7990-4064-b48b-fc5ef5489b25%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
s***@gmail.com
2017-11-28 14:30:40 UTC
Permalink
I had the same problem with my RPi3 -- seems the open file limit is set way too low to be useful (mine was set for like 2048). Since yours is set to 65536, I'm wondering if that limit is different for the user that owns influxdb -- did you get that ulimit output below while running as root?

If you find that the influxdb user acct open file limit is low, you'll need to increase it. However, I was never able to figure out how to do that on my RPi3. I tried several suggestions, but none of them worked for me. So if you do figure out how to increase the limit, please let me know what you did.

The good news is that your db files are all available on another device. Worst case, you can install influx on another (bigger) computer, mount the shared drive, and run it from there (at least long enough to backup or export your data). The only way I could get mine running after hitting the open file limit was to remove some of the (non-essential) data/meta directories before starting influx. Good Luck!
--
Steve
Post by fanavity via InfluxData
The only special feature is that I save the data, meta and wal folder on a network drive.
What can I do to regain my temperature readings? Where is my mistake?
ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 7695
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 65536
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 7695
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
--
Remember to include the version number!
---
You received this message because you are subscribed to the Google Groups "InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/dc6f4f9a-a41b-4487-ad16-6f2e0f411478%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...