Connection timed out


(Sriram) #1

Hi,
We are using the Spring-data-neo4j(SDN) and the Java web application is deployed in Tomcat 9.0.8. Neo4j version is 3.4.3. Neo4j and Tomcat are installed in different machines. For every query to Neo4j a new session is opened using the SessionFactory.openSession provided by SDN and this is closed after the cypher completes. We are getting the connection related errors frequently in the application server logs. Without restarting neither Neo4j nor Tomcat the next request is executed and results are obtained. Following are the logs from tomcat log.

Time out exception:
SEVERE [Neo4jDriverIO-4-4] org.neo4j.driver.internal.logging.JULogger.error [0x6e1c86d9] Fatal error occurred in the pipeline
java.io.IOException: Connection timed out
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:192)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
at org.neo4j.driver.internal.shaded.io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288)

Connection to Database failed
"org.neo4j.ogm.exception.TransactionException: Connection to the database failed
at org.neo4j.ogm.drivers.bolt.transaction.BoltTransaction.rollback(BoltTransaction.java:59)
at com.boeing.tnps.metadata.service.AbstractMetadataServiceImpl.saveObject(AbstractMetadataServiceImpl.java:449)
at com.boeing.tnps.metadata.service.AbstractMetadataServiceImpl.createResource(AbstractMetadataServiceImpl.java:157)
at com.boeing.tnps.metadata.service.AbstractMetadataServiceImpl.createResource(AbstractMetadataServiceImpl.java:46)
at com.boeing.tnps.metadata.controller.ResourceMetadataRest.createResource(ResourceMetadataRest.java:84)

Please let us know if you need more information.