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: