# \`d/client\` does network access

**URL:** <https://forum.datomic.com/t/d-client-does-network-access/2376>\
**Category:** Datomic Cloud\
**Created:** [February 5, 2024, 6:54am UTC](https://forum.datomic.com/t/d-client-does-network-access/2376 "2024-02-05T06:54:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![onetom](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/onetom/32/430_2.png) [@onetom](https://forum.datomic.com/u/onetom)\
**Post date:** [February 5, 2024, 6:54am UTC](https://forum.datomic.com/t/d-client-does-network-access/2376/1 "2024-02-05T06:54:46Z")

</div>

According to [datomic.client.api documentation](https://docs.datomic.com/client-api/datomic.client.api.html#var-client) :

> 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:

```auto
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:

```clojure
{: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.

---

<div class="post-metadata">

**Author:** ![jaret](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/jaret/32/45_2.png) [@jaret](https://forum.datomic.com/u/jaret)\
**Post date:** [February 5, 2024, 12:59pm UTC](https://forum.datomic.com/t/d-client-does-network-access/2376/2 "2024-02-05T12:59:31Z")

</div>

@onetom Thanks for the report. I believe this is a result of checking s3 for credentials which admittedly is “a server”, but is not actually communicating beyond credential checking. I am confirming with the team on how the doc string should change.

I tested an example with a system that absolutely does not exist:

```auto
(d/client {:server-type :ion
:system "my-system"
:endpoint "http://i-dont-exist.datomic.net:8182"
:region "us-west-2"})
Execution error (ExceptionInfo) at datomic.client.impl.cloud/get-s3-auth-path (cloud.clj:179).
Unable to connect to http://i-dont-exist.datomic.net:8182

```

---

<div class="post-metadata">

**Author:** ![onetom](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/onetom/32/430_2.png) [@onetom](https://forum.datomic.com/u/onetom)\
**Post date:** [July 1, 2026, 7:41am UTC](https://forum.datomic.com/t/d-client-does-network-access/2376/3 "2026-07-01T07:41:29Z")

</div>

This network access is still not mentioned in the documentation.

We are still struggling from occasional “Loading database” exceptions, so I’m revisiting the options for workarounds, that’s why I came back to here.

```auto
ExceptionInfo: Loading database
    at datomic.client.api.async/ares(async.clj:58)
    at datomic.client.api.async/ares(async.clj:54)
    at datomic.client.api.sync/eval69734/fn--69739(sync.clj:119)
    at datomic.client.api.protocols/fn--13421/G--13362--13428(protocols.clj:72)
    at datomic.client.api/transact(api.clj:227)
    at datomic.client.api/transact(api.clj:188)
...

```
