C# Driver - Aura Routing Errors - Is there a best practice?

I'm using the Neo4j Driver (4.2.0) to connect to Aura, but I'm receiving constant errors about clusters, and router tables, and I can see from the forum that others are having similar issues. This is my first time deploying to Aura.

For example, yesterday i received the error:

Failed to acquire a connection from connection pool for server with URI

So I changed my driver settings in Startup.cs to:

  var driver = GraphDatabase.Driver(url, AuthTokens.Basic(username, password), o =>
             {
                 o.WithSocketKeepAliveEnabled(true);
                 o.WithMaxConnectionLifetime(TimeSpan.MaxValue);
             });

            services.AddSingleton(driver);

and when I logged into to my web app this morning I couldn't connect to Aura with a new error:

Failed to connect to any routing server. Please make sure that the cluster is up and can be accessed by the driver and retry.

To be honest I have no idea, how to configure the driver to resolve this. I had expected to set the connection string to Aura and away I go, but I'm confused by these routing error messages. I'm also confused by some examples of the URI being "bolt+routing" (which the driver doesn't support), and "neo4j+s" (which I'm using)

Are there any recommended values specifically for Aura for these settings:

WithConnectionAcquisitionTimeout
WithConnectionIdleTimeout
WithConnectionTimeout
WithDefaultReadBufferSize
WithDefaultWriteBufferSize
WithEncryptionLevel
WithFetchSize
WithIpv6Enabled
WithMaxConnectionLifetime
WithMaxConnectionPoolSize
WithResolver
WithMaxTransactionRetryTime

If you look at the example here Neo4j Aura under dot.net, it is always neo4j+s:// , so forget about bolt+routing under Aura.

If you go to the Neo4j Browser and log in and run
call dbms.cluster.routing.getRoutingTable({})
you will get some info back about the routing tables.
mine said


I was able to follow the instructions in the Neo4j Aura and had a working .net program in a few minutes.
Can you try with the dead simple program in that example?
Did you try to recycle your app? You may need to put code in there to recycle/restart the driver if things go sideways in your app.
I am leaning towards a networking issue between your app and the database, or the driver gets disconnected by a proxy somewhere in between, and you don't have any recovery code.
Also - if you click on Support in your Aura Console and log in, you can scroll to the bottom and open a proper trouble ticket in the rare event that there is something wrong with your db.

Hey @david_rosenblum thanks for the reply. The issue isn't so much getting Aura up and running, which is straightforward, but keeping it running. To put it in context, I was running neo4j on a single Elastic Beanstalk instance on AWS and it runs great, really fast, and no issues at all. I was drawn to Aura for scale, robustness, and management, but this issue is too opaque. I've no idea why it's happening, and although I can build in some fault tolerance, I don't want to be hitting it every 10 minutes. I opened a support ticket, so I will wait and see what comes back. Thanks again.