If your Aura-backed application runs on Azure and runs with the .Net driver for Neo4j you should be aware that the drivers do a lot of connection and socket management for you. But on some cloud providers the default network settings aggressively close unused connections.
For Azure in particular this is controlled by setting the timeout for the load balancer. If this is not set appropriately it will interfere with connections to Aura.
To avoid having connection issues you should set the following properties in your driver object :
- SocketKeepAlive should be set to true
- MaxConnectionLifetime should be set to smaller value than the TCP timeout .
Start with 10 Minutes but adjust based on your Azure cloud properties.
Unable to read message from server neo4j://neo4j-core-xxxxxxxx-52.production-orch-0001.neo4j.io:7687/, connection will be terminated.
System.IO.IOException: Unexpected end of stream, ChunkBuffer was not populated with any data
at Neo4j.Driver.Internal.IO.ChunkReader.PopulateChunkBufferAsync(Int32 requiredSize)
at Neo4j.Driver.Internal.IO.ChunkReader.ReadDataOfSizeAsync(Int32 requiredSize)
at Neo4j.Driver.Internal.IO.ChunkReader.ConstructMessageAsync(Stream outputMessageStream)
at Neo4j.Driver.Internal.IO.ChunkReader.ReadNextMessagesAsync(Stream outputMessageStream)
at Neo4j.Driver.Internal.IO.MessageReader.ReadAsync(IResponsePipeline pipeline)
at Neo4j.Driver.Internal.Connector.SocketClient.ReceiveOneAsync(IResponsePipeline responsePipeline)