According to datomic.client.api documentation :
This function does not communicate with a server and returns immediately.
However, I do get exceptions quite often lately on d/client
calls, which are delayed by a few seconds, so i suspect the network is involved:
Execution error (ExceptionInfo) at datomic.client.impl.cloud/get-s3-auth-path (cloud.clj:179).
Unable to connect to https://datomic.***.co
clojure.lang.ExceptionInfo: Unable to connect to https://datomic.***.co
cloud.clj:179 datomic.client.impl.cloud/get-s3-auth-path
cloud.clj:170 datomic.client.impl.cloud/get-s3-auth-path
cloud.clj:211 datomic.client.impl.cloud/create-client
cloud.clj:194 datomic.client.impl.cloud/create-client
Var.java:386 clojure.lang.Var.invoke
impl.clj:32 datomic.client.api.impl/dynarun
impl.clj:29 datomic.client.api.impl/dynarun
impl.clj:39 datomic.client.api.impl/dynacall
impl.clj:36 datomic.client.api.impl/dynacall
async.clj:102 datomic.client.api.async/client
async.clj:64 datomic.client.api.async/client
sync.clj:113 datomic.client.api.sync/client
sync.clj:111 datomic.client.api.sync/client
Var.java:386 clojure.lang.Var.invoke
impl.clj:32 datomic.client.api.impl/dynarun
impl.clj:29 datomic.client.api.impl/dynarun
impl.clj:39 datomic.client.api.impl/dynacall
impl.clj:36 datomic.client.api.impl/dynacall
api.clj:90 datomic.client.api/client
api.clj:48 datomic.client.api/client
api.clj:87 datomic.client.api/client
api.clj:48 datomic.client.api/client
...
where datomic.***.co
is an Route 53 alias A record to a Datomic client API GW (d-xxx.execute-api.ap-northeast-1.amazonaws.com.
)
The d/client
config looks like this:
{:server-type :ion,
:storage-dir :mem,
:region "ap-northeast-1",
:endpoint "https://datomic.***.co",
:creds-profile "***-dev"}
(the :storage-dir :mem
map entry is irrelevant of course, or at least it should be, but i mention it, in case it somehow causes some interference.)
If it’s indeed making some network requests and it’s an expected behavior, it would worth adjusting the Datomic Client API docs accordingly.
This is happening on Datomic Cloud systems running on CloudFormation template version 1067-9276
still, but earlier versions had this issue too.
We just made new stacks from the latest 1102-9309
CF templates recently and I think those also exhibited this issue, but I’ll confirm, if it happens again.
We are using a single t3.medium
instance for this and another system, which also has this behaviour. We do have a 2 i3.large
instance system too, which didn’t have this problem, so we suspect it’s either an instance-type or instance-count issue.