The desktop becomes stuck and the database crashed when executing thousands of queries using neo4r

Hi, everyone,

I have 10,000 nodes which interact with each other (one node interacts with other 9,999 nodes). I generated cypher queries for each node and relationship and then call call_neo4j function in R package Neo4r. Then, I use merge operation to store the nodes and relationships to the database one by one. However, the computer becomes stuck after a few minutes. I thought this may be caused by operation merge, then I changed merge to create. But it did not work. Then I checked the log file, here was the error:

019-09-18 01:51:46.110+0000 WARN [o.n.k.i.c.VmPauseMonitorComponent] Detected VM stop-the-world pause: {pauseTime=158, gcTime=0, gcCount=0}

I searched this forum, and found that this may be caused by memory. Following Fatal error occurred when handling a client connection causes crash, I use neo4j-admin memrec to optimize the memory configuration. However, it did not work either.

Please give me some suggestions. Many thanks!

Neo4j Desktop: version 1.2.1
Neo4r: version 0.1.1
System: ubuntu 16.04 LTS; memory 16G.