# Cannot allocate memory on Ion push

**URL:** <https://forum.datomic.com/t/cannot-allocate-memory-on-ion-push/1384>\
**Category:** Datomic Cloud\
**Created:** [March 12, 2020, 4:38pm UTC](https://forum.datomic.com/t/cannot-allocate-memory-on-ion-push/1384 "2020-03-12T16:38:18Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dean](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/dean/32/291_2.png) [@Dean](https://forum.datomic.com/u/Dean)\
**Post date:** [March 12, 2020, 4:38pm UTC](https://forum.datomic.com/t/cannot-allocate-memory-on-ion-push/1384/1 "2020-03-12T16:38:18Z")

</div>

We frequently (daily) get an error in our dev env when pushing:

```
[stderr]OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000fa900000, 41418752, 0) failed; error='Cannot allocate memory' (errno=12)
[stdout]# There is insufficient memory for the Java Runtime Environment to continue.
[stdout]# Native memory allocation (mmap) failed to map 41418752 bytes for committing reserved memory.
[stdout]# An error report file with more information is saved as:
[stdout]# /tmp/hs_err_pid14747.log

```

Looks like the java process is using 1639896 bytes but our heap usage is

```
Heap Configuration:
Heap Usage:
G1 Heap:
    used = 314203648 (299.64794921875MB)
G1 Young Generation:
Eden Space:
   used = 126877696 (121.0MB)
Survivor Space:
   used = 15728640 (15.0MB)
G1 Old Generation:
   used = 171597312 (163.64794921875MB)

```

Is there a way of altering the default settings of `-Xmx1220m -Xms1220m`? (we’d probs be better at 800/900Mb)

---

<div class="post-metadata">

**Author:** ![Dean](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/dean/32/291_2.png) [@Dean](https://forum.datomic.com/u/Dean)\
**Post date:** [March 12, 2020, 4:51pm UTC](https://forum.datomic.com/t/cannot-allocate-memory-on-ion-push/1384/2 "2020-03-12T16:51:17Z")

</div>

Forgot to say: solo deployment.

---

<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:** [March 16, 2020, 3:00pm UTC](https://forum.datomic.com/t/cannot-allocate-memory-on-ion-push/1384/3 "2020-03-16T15:00:38Z")

</div>

Hi Dean,

Solo runs on a very small instance with limited memory (by design, to keep the cost low). The error you’re seeing indicates that the deployment you’re running exceeds the memory available for a solo system. When you need more capability, you can upgrade to [Production](https://docs.datomic.com/cloud/operation/planning.html#production).

Thanks,  
Jaret

---

<div class="post-metadata">

**Author:** ![Dean](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/dean/32/291_2.png) [@Dean](https://forum.datomic.com/u/Dean)\
**Post date:** [March 16, 2020, 5:47pm UTC](https://forum.datomic.com/t/cannot-allocate-memory-on-ion-push/1384/4 "2020-03-16T17:47:36Z")

</div>

Sure, we already use production for our production site - this is our test system. We’d like to use more test systems, and obviously using prod deployments will increase the cost dramatically. The application isn’t under memory pressure but it seems the jvm is taking up more native memory than is possible for the deployment to run.

---

<div class="post-metadata">

**Author:** ![jacob](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/jacob/32/302_2.png) [@jacob](https://forum.datomic.com/u/jacob)\
**Post date:** [March 17, 2020, 10:57pm UTC](https://forum.datomic.com/t/cannot-allocate-memory-on-ion-push/1384/5 "2020-03-17T22:57:48Z")

</div>

I believe the official recommendation (as per [https://docs.datomic.com/cloud/operation/planning.html#stages](https://docs.datomic.com/cloud/operation/planning.html#stages)) is to use separate query groups for testing rather than setting up entirely new systems.

---

<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:** [March 18, 2020, 5:13pm UTC](https://forum.datomic.com/t/cannot-allocate-memory-on-ion-push/1384/6 "2020-03-18T17:13:15Z")

</div>

@Dean I discussed your case with the Product team this morning and we’re interested in learning more as we havent seen this profile of mem usage in our testing. I am going to put my request here in the forum post, but it might be prudent to move this discussion to a support case where we can more easily share information and credentials. If that’s suitable to you, shoot me an e-mail at [support@cognitect.com](mailto:support@cognitect.com) to create a case.

Questions we have:

1. What jdk invocation is failing? (The deploy or the actual process)
2. When does this happen more specifically? I know you mentioned on-push, but is it every push?
3. What generally does your program do? Is there anything unique? Are you setting memory in your program?
4. Finally, if you’re fine to open a case we would like to get log access to look at this system. The access would be Read-only and I can share details on how to create the account in the case.

Thanks,  
Jaret

---

<div class="post-metadata">

**Author:** ![Dean](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/dean/32/291_2.png) [@Dean](https://forum.datomic.com/u/Dean)\
**Post date:** [April 6, 2020, 10:55am UTC](https://forum.datomic.com/t/cannot-allocate-memory-on-ion-push/1384/7 "2020-04-06T10:55:33Z")

</div>

Hi Jaret, I sent a mail (from personal account linked here and business account) but didn’t get a response, has it been lost in spam?

Cheers,  
Dean

---

<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:** [April 7, 2020, 1:35pm UTC](https://forum.datomic.com/t/cannot-allocate-memory-on-ion-push/1384/8 "2020-04-07T13:35:26Z")

</div>

Hi @Dean it appears it did get caught in spam. I am recovering and will update the case shortly. Apologies for the delay!

---

<div class="post-metadata">

**Author:** ![Dean](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/dean/32/291_2.png) [@Dean](https://forum.datomic.com/u/Dean)\
**Post date:** [May 27, 2020, 4:20pm UTC](https://forum.datomic.com/t/cannot-allocate-memory-on-ion-push/1384/9 "2020-05-27T16:20:50Z")

</div>

For other people this affects, it was fixed by an upgrade to ion-dev (0.9.265) - thanks to the datomic team.

---

<div class="post-metadata">

**Author:** ![adamtait](https://avatars.discourse-cdn.com/v4/letter/a/35a633/32.png) [@adamtait](https://forum.datomic.com/u/adamtait)\
**Post date:** [July 7, 2021, 12:17am UTC](https://forum.datomic.com/t/cannot-allocate-memory-on-ion-push/1384/10 "2021-07-07T00:17:30Z")

</div>

I ran into this issue today running ion-dev (0.9.282). The [solution from this thread](https://forum.datomic.com/t/where-to-look-in-aws-when-deploy-not-push-fails/729/4), while not good did allow me to move forward. The solution is to reboot/terminate the solo EC2 instance.
