I execute a long running (5 mintues) Cypher query with py2neo 2.0:
graph.cypher.run(query)
or result = graph.cypher.execute(query)
The query fails after ~60 sec with a Socket Error from httpstream:
ERROR:httpstream:! SocketError: timed out
The same happens when I use a Cypher transaction. This did not happen with the same query and py2neo 1.6.4. Can I increase the time py2neo waits for a response? I didn't find anything in the docs.
Update
I found a hard coded socket_timeout
in py2neo.packages.httpstream.http
. Setting it to a higher value avoids the SocketError:
from py2neo.packages.httpstream import http
http.socket_timeout = 9999
result = graph.cypher.execute("MATCH (g:Gene) RETURN count(g)")
Can I somehow set the timeout for a single query?