I have neo4j enterprise version installed on a server. Currently i am trying to run a python script on my PC which is supposed to connect with the neo4j db (using neo4j lib) and retrieve the information .
The connection is getting created successfully but when i run the query using the session.run({query}) i am getting mixed results.
For a query which has a result of of 50-70 records, the query is getting executed successfully and getting the results from the server.
But for the query which has result of 100+ records, the connection is getting forcibly shut from remote server and on the python's end the code is stuck for 15 mins then closes automatically.
When examined the logs, i am getting below information :
2023-05-27 15:30:40.964+0000 ERROR [o.n.b.t.p.HouseKeeper] Fatal error occurred when handling a client connection: [id: 0xeaf72ce5, L:/<IP>:7687 - R:/<IP>:49845]
java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.read0(Native Method) ~[?:?]
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43) ~[?:?]
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:276) ~[?:?]
at sun.nio.ch.IOUtil.read(IOUtil.java:233) ~[?:?]
at sun.nio.ch.IOUtil.read(IOUtil.java:223) ~[?:?]
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:358) ~[?:?]
at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:258) ~[netty-buffer-4.1.73.Final.jar:4.1.73.Final]
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132) ~[netty-buffer-4.1.73.Final.jar:4.1.73.Final]
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:350) ~[netty-transport-4.1.73.Final.jar:4.1.73.Final]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151) [netty-transport-4.1.73.Final.jar:4.1.73.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722) [netty-transport-4.1.73.Final.jar:4.1.73.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658) [netty-transport-4.1.73.Final.jar:4.1.73.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584) [netty-transport-4.1.73.Final.jar:4.1.73.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496) [netty-transport-4.1.73.Final.jar:4.1.73.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986) [netty-common-4.1.73.Final.jar:4.1.73.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.73.Final.jar:4.1.73.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.73.Final.jar:4.1.73.Final]
at java.lang.Thread.run(Thread.java:834) [?:?]
When examined the query logs, it is giving correct results but just not relaying the info back to pyhton. Query Logs :
2023-05-27 15:29:59.103+0000 INFO Query started: id:29 - 0 ms: 0 B - bolt-session bolt neo4j-python/5.8.1 Python/3.9.5-final-0 (win32) client/<IP>:49845 server/<IP>:7687> adaptive - neo4j - <MATCH QUERY> LIMIT 100; - {} - runtime=null - {}
2023-05-27 15:29:59.119+0000 INFO id:29 - 13 ms: 25264 B - bolt-session bolt neo4j-python/5.8.1 Python/3.9.5-final-0 (win32) client/<IP>:49845 server/<IP>:7687> adaptive - neo4j - <MATCH QUERY> LIMIT 100; - {} - runtime=pipelined - {}
I have execute the match query using cypher shell and it is giving correct results.
I am using neo4j 4.4 and the connection between the PC and the neo4j is open.
Can you please suggest what else can i try so that i can get the results back correctly in python.
Thanks in advance !!