# Cache behaviour on production topology

**URL:** https://forum.datomic.com/t/cache-behaviour-on-production-topology/757
**Category:** Datomic Cloud
**Created:** [December 21, 2018, 5:13pm UTC](https://forum.datomic.com/t/cache-behaviour-on-production-topology/757 "2018-12-21T17:13:39Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![gmorice](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/gmorice/32/246_2.png) [@gmorice](https://forum.datomic.com/u/gmorice)
#### Post date: [December 21, 2018, 5:13pm UTC](https://forum.datomic.com/t/cache-behaviour-on-production-topology/757/1 "2018-12-21T17:13:39Z")

</div>

Hi,

I am currently working on an ions based application deployed on a dedicated query group in a production topology. I am a bit confused by the behaviour of the cache. Indeed once a new revision of the ions is deployed, it can take between a few seconds and several hours to see new transactions (even the ones performed by the ions). Once new transactions are available, the problem does not seem to occur until a new deployment. I do not experience such behaviour when I am working locally.

Is there a way to configure the cache in order to have less delay between a deployment and the availability of new transactions ?

Environment:

- Datomic Cloud revision (storage, compute, query group): 454-8573
- Datomic ion: 0.9.28
- Clojure: 1.9.0 and 1.10.0
- Compute instance type: 2 i3.large
- Query group instance type: 1 t2.medium
- Query Group has no preload of database
- AWS region: eu-central-1

Thanks

---

<div class="post-metadata">

### Author: ![marshall](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/marshall/32/48_2.png) [@marshall](https://forum.datomic.com/u/marshall)
#### Post date: [December 26, 2018, 7:22pm UTC](https://forum.datomic.com/t/cache-behaviour-on-production-topology/757/2 "2018-12-26T19:22:44Z")

</div>

Can you be more specific about what your application is doing when it “can’t see” newer transactions?

Are you able to run queries but you do not get the expected results? Do queries run directly on the compute instances (i.e. not query group instances) return different results?

I would also be interested in taking a look at your ion code and/or your CloudWatch logs and metrics over the period where you see this inconsistency. If you would be willing to provide read only access to your CloudWatch logs, can you email me ([marshall@cognitect.com](mailto:marshall@cognitect.com)) to set that up?

Thanks!

---

<div class="post-metadata">

### Author: ![gmorice](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/gmorice/32/246_2.png) [@gmorice](https://forum.datomic.com/u/gmorice)
#### Post date: [December 27, 2018, 9:36am UTC](https://forum.datomic.com/t/cache-behaviour-on-production-topology/757/3 "2018-12-27T09:36:10Z")

</div>

Hi,

The application is reacting to an http request through a web service ion and issue a Datomic query to list specific entities. The query runs well, however, I kind of get stuck in the version of the database on which the first query was performed. Indeed, if transactions are then performed to add or retract entities, I cannot see the new version of the database by issuing again the request to list the entities. This situation can last for minutes to hours and then for some ignored reason the application get access to the latest version of the database and I can see the result of all the transactions. The problem can not be reproduced then until a new deployment.

I deployed the same ion working on the same database on the compute instances and I cannot reproduce the problem. Moreover, if I use the compute instances and query group deployments at the same time I get different results. The compute instances deployment always return results from the freshest version of the database while the query group deployment get stuck on the old version.

I hope this is clear, I struggle a bit to find a proper way to describe the problem.

I will send you a mail for the CloudWatch access.

Thanks

---

<div class="post-metadata">

### Author: ![marshall](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/marshall/32/48_2.png) [@marshall](https://forum.datomic.com/u/marshall)
#### Post date: [January 16, 2019, 3:15pm UTC](https://forum.datomic.com/t/cache-behaviour-on-production-topology/757/4 "2019-01-16T15:15:50Z")

</div>

We’ve reproduced this behavior and are working on a fix that should be included in the next release.

Thanks for catching this!

---

<div class="post-metadata">

### Author: ![marshall](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/marshall/32/48_2.png) [@marshall](https://forum.datomic.com/u/marshall)
#### Post date: [February 22, 2019, 6:07pm UTC](https://forum.datomic.com/t/cache-behaviour-on-production-topology/757/5 "2019-02-22T18:07:22Z")

</div>

The latest release of Datomic Cloud includes a fix for this issue:

> [@Datomic Cloud version 470-8654](https://forum.datomic.com/t/datomic-cloud-version-470-8654/854):
>
> This message covers changes in this release. For more details, see [https://docs.datomic.com/cloud/releases.html](https://docs.datomic.com/cloud/releases.html) 02/22/2019 - 470-8654 - Compute Template Update The 470-8654 release contains fixes, enhancements, and dependency updates: Fix: Production nodes now use the [documented -Xss values](https://docs.datomic.com/cloud/ions/ions-reference.html#jvm-settings) for starting the JVM, preventing stack overflow when compiling complex ion applications. Fix: Fixed bug where ion connections could fail to become aware of recent transactions in a timely manner. Fix: Al…
