Hi all, I’m running Neo4j 5.x on Ubuntu (Jetstream2 cluster) and keep hitting timeout and disconnect errors when running long Cypher queries via cypher-shell.
Example command: cypher-shell -a bolt://<public_ip>:7687 -u neo4j -p '' < queries.cypher Error: Connection to the database terminated. Please ensure that your database is listening on the correct host and port and that you have compatible encryption settings. Note that the default encryption setting has changed in Neo4j 4.0.
What I tried: Increased memory in
neo4j.conf: server.memory.heap.initial_size=3g
server.memory.heap.max_size=3g
server.memory.pagecache.size=12g
dbms.memory.transaction.total.max=4g
Checked logs (journalctl -u neo4j) → saw OutOfMemoryError: Java heap space Tried setting Bolt keep-alive configs, but some keys (like server.bolt.keep_alive_interval) aren’t recognized
My questions: What’s the correct way to tune keep-alive / timeout settings for very long-running queries in Neo4j 5.x? Should I adjust dbms.memory.transaction.total.max or increase heap further (I have ~30GB RAM available)?
Is there a better practice for running multi-hour queries via cypher-shell (batching, streaming results, etc.)? Logs snippet: java.lang.OutOfMemoryError: Java heap space Connection read timed out due to it taking longer than the server-supplied timeout value via configuration hint.
For context, I’m running on the Amazon dataset (~300M nodes, ~700M edges).