ArangoDB Too many open files

since after a few days we have a problem with our installation of ArangoDB. A few minutes / up to an hour after starting, all database connections are rejected. The arango log file says there are "Too many open files." "Lsof | grep arango | wc -l" indicates that the database has about 50,000 open file descriptors, which is a lot for max. allowed by linux system (about 3 m). Does anyone know where this error came from?

We are using Ubuntu Linux with the 3.13 kernel. 30 GB of RAM and three cores. The database is still very small with a volume of about 1.5 m and a size of 50 GB.

thanks secana

EDIT: "netstat -anpt | fgrep 2480" shows:

root@syssec-graphdb-001-test:~# netstat -anpt | fgrep 2480
tcp        0      0 10.215.17.193:2480      0.0.0.0:*               LISTEN               7741/arangod
tcp        0      0 10.215.17.193:2480      10.215.50.30:53453      ESTABLISHED          7741/arangod
tcp        0      0 10.215.17.193:2480      10.215.50.31:49299      ESTABLISHED          7741/arangod
tcp        0      0 10.215.17.193:2480      10.215.50.30:53155      ESTABLISHED          7741/arangod

"ulimit -n" has a result of 1024, so I think that ~ 50,000 are all arango processes together.

The last lines in the log file before the database died:

2015-05-26T12:20:43Z [9672] ERROR cannot open datafile '/data/arangodb/databases/database-235999516/collection-28464454696/datafile-18806474509149.db': 'Too many open files'
2015-05-26T12:20:43Z [9672] ERROR cannot open datafile '/data/arangodb/databases/database-235999516/collection-28464454696/datafile-18806474509149.db': Too many open files
2015-05-26T12:20:43Z [9672] DEBUG [arangod/VocBase/collection.cpp:1632] cannot open '/data/arangodb/databases/database-235999516/collection-28464454696', check failed
2015-05-26T12:20:43Z [9672] ERROR cannot open document collection from path '/data/arangodb/databases/database-235999516/collection-28464454696'
+4
source share
2 answers

It seems like it will make sense to increase max. The number of open files that are allowed to control the process. Given a declared database size of around 50 GB, a value (presumably by default) of 1024 seems too low.

arangod will require one file descriptor for each concurrent client connection. This may not be so much, but despite the existence of HTTP keep-alive connections, it may already contain several file descriptors.

, . 32 , 50 ( ) 1600 :

50 GB database size / (32 MB default size / 1 datafile) = 1600 datafiles

ulimit -n arangod . , arangod , --server.descriptors-minimum <value>, .

--server.descriptors-minimum 32768 

. arangod , . , arangod.conf.

, () journalSize . , , .

+2

, , , , , ulimit .

-linux-2.21, prlimit, C , .

, :

cat /proc/<PID>/limits

!

+1

All Articles