StackOverflowError on cypher-shell

apoc
cypher

(Vivien Giraud) #1

Hi,

I've made a small script (30 lines) using apoc procedures (periodic.iterates, load.csv, do.when & convert.toString).
The loaded csv is 100MB.
The script works fine when launching using cat file.cypher | cypher-shell but I having error when launched using cron

Failed to invoke procedure `apoc.periodic.iterate`: Caused by: java.lang.StackOverflowError

EDIT: And since, right now, the script is now failing even using cat file.cypher | cypher-shell with the same SO error.

Any idea why ?


(Vivien Giraud) #2

Switching this command :
{batchSize:10000, iterateList:true, parallel:true, concurrency:10000});
to this one :
{batchSize:1000, iterateList:true, parallel:true, concurrency:1000});
Seems to have fixed the problems.
Is this the normal way to fix it ?


(Michael Hunger) #3

Why would you ever use concurrency 10000? do you have 10000 cores?

Just leave it off, then it uses however many CPUs you have.


(Vivien Giraud) #4

Hmmmm, OK.
I used this setting because I found it on a gist.
Nice to know it's related to CPU cores.

Thanks @michael.hunger !


(Vivien Giraud) #5

Just check the documentation, it's written that the default value for concurrency is 50, I don't think this is the average cores on any computer used for neo4j.
To me the documentation does not help to know it's related to CPU cores.


(Michael Hunger) #6

Which gist was that? We might want to ask the author to fix it.


(Michael Hunger) #7

You're right we might want to reduce that.

But machines that Neo4j runs on (esp. with graph algos) have quite some number of cores. I've definitely seen 32, 64, 96 and 144 core machines running Neo4j.