2

I'm using Neo4j 3.2.2 and Spring Data Neo4j on my project Blockchain2graph.

My batch is getting data from bitcoind and insert them into neo4j. After each imported block, I make a session.clear().

After some time, i get a :

Could not open Neo4j Session for transaction; nested exception is org.neo4j.driver.v1.exceptions.ServiceUnavailableException: Unable to process request: Too many open files

After restarting the application, right away, i get the same "Too many open files" exception. Can someone explain me ? Does neo4j opens all those files when it starts ?

I'm running on Debian and my /etc/security/limits.conf file contains :

*           soft    nofile      150000
*           hard    nofile      150000
root        soft    nofile      150000
root        hard    nofile      150000
neo4j       soft    nofile      150000
neo4j       hard    nofile      150000

and my /etc/pam.d/common-session file contains :

session required pam_limits.so

1 Answers1

0

after each batch save in database, I make a session.clear();

  • Can you explain in greater detail how this answers your question? – anothermh Dec 30 '18 at 22:51
  • Hello, seems the session keeps on opening files without closing them. DOing a session.clear() seems to clean the file (even if i'm not sure). You can see the code here : https://github.com/straumat/blockchain2graph/blob/version-3.0/bitcoin-neo4j/project-back-end/src/main/java/com/oakinvest/b2g/batch/ImportBatch.java#L95 – Stéphane Traumat Jan 03 '19 at 09:33
  • What I was recommending is that you expand on the answer _in the answer_ because as it currently stands this is a very low quality answer. – anothermh Jan 03 '19 at 09:35