Too many open files
crystalin opened this issue · comments
Alan Sapede commented
Trying to use the kvdb on Moonbeam rocksdb fails:
ERROR polkadot_kvdb] FATAL: cannot start kvdb tool: IO error: While open a file for random read: /var/lib/moonbeam-rocksdb-data/chains/moonbeam/db/full/169392.sst: Too many open files
I'm using default ulimit for Ubuntu 22:
>ulimit -a
real-time non-blocking time (microseconds, -R) unlimited
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 254990
max locked memory (kbytes, -l) 8174176
max memory size (kbytes, -m) unlimited
open files (-n) 2048
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) 254990
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
There are 20k files in the db/full folder
Vsevolod Stakhov commented
It seems your limit of open files (-n
= 2048) is not enough to read that database. I'm not quite sure what is the underlying reason for that large amount of files (I'd check pruning of RocksDB in that case).