I’ve got ArangoDb running in Docker like this:
docker run -e ARANGO_NO_AUTH=1 -p 8529:8529 -d -v C:Programmingxxxarangodb:/var/lib/arangodb3 arangodb
And I’m connecting to it using ArangoDBNetStandard in the most usual way from the examples:
var transport = HttpApiTransport.UsingBasicAuth(
new Uri(host), // "http://localhost:8529"
dbName,
user,
pass);
db = new ArangoDBClient(transport);
It takes forever for the first connection. That is, not the call to connect (the db = ...
) but the first call to await db.Document.GetDocumentAsync
, or db.Graph.GetGraphAsync
. It doesn’t matter what. Subsequent calls are fast.
This is very visible in Unit tests, where the first test takes 20+ seconds, and the rest are almost instant.
One weird (but perhaps telling) trait is that if I pause before the first ...Get
call, but after db = new...
for more than 20 seconds, it’s also fast.
So it seems there has to pass some time between connecting to the db, and issuing the first call. After that it’s OK for a while. If I wait for a long time before issuing new requests (not from UT but from my web app), then I get the long wait.
My guess is that there’s some timeout somewhere, some certificate issue or something (IDK because the HttpApiTransport is HTTP, not HTTPS, right), but this is what it feels like.
Any tips? I think it started after upgrading Docker Desktop (on Windows w. WSL2), but I can’t be 100% sure.
5