I am using RocksDBJava after running the service for sometime I can see the "Too many open files" exception. Digging through the previous issue mentioned on the portal I found out that it is because of system limitation of opening a maximum number of files. When I check the directory, which the rocksDB is using, I noticed there is over 100K sst files of 1KB size, and this can be the reason of the given error. I wanted to know is there any way by which we can configure the rocksDB to generate SST files of large size, so that the total number of files created is minimum and we can avoid this error.
Also in my current project there are many read threads and one write thread, and I open and close the connection (using RocksDB.open()
and RocksDB.close()
) before reading or writing to the rocksDB.