Hello Everybody,
I recently started developing an app that uses neo4j. I am facing an issue when I am sending concurrent requests to the DB instance.
For example, if I call a simple match query
MATCH (n:Box) WHERE n.BoxId = $box1Id XOR n.BoxId = $box2Id RETURN n.BoxId limit 1
in a single thread 10 times, results will be returned within 10 ms (there is an index on BoxId property).
If I make the same 10 requests in parallel, then I will get results back in 10 s. One additional thing to note is that if I run 10 requests per thread, only the first request for each thread will take 10s to return, the rest of the requests will return within 10ms.
I tried updating the following things in server configuration:
dbms.connector.bolt.enabled=true
dbms.connector.bolt.thread_pool_min_size=10
dbms.connector.bolt.thread_pool_max_size=100
dbms.connector.bolt.thread_pool_keep_alive=10m
dbms.threads.worker_count=10
dbms.memory.heap.initial_size=1G
dbms.memory.heap.max_size=2G
dbms.memory.pagecache.size=1G
The code sample that I am using can be seen here.(using System;using System.Collections.Generic;using System.Threading;using - Pastebin.com)
The server settings that I am using can be seen here.(#*****************************************************************# Neo4j conf - Pastebin.com)
Thanks in advance