# Max Heap Size

**URL:** <https://community.openhab.org/t/max-heap-size/44702>\
**Category:** Beginners\
**Created:** [May 9, 2018, 8:01am UTC](https://community.openhab.org/t/max-heap-size/44702 "2018-05-09T08:01:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tnemrap](https://community.openhab.org/user_avatar/community.openhab.org/tnemrap/32/61523_2.png) [@tnemrap](https://community.openhab.org/u/tnemrap)\
**Post date:** [May 9, 2018, 8:01am UTC](https://community.openhab.org/t/max-heap-size/44702/1 "2018-05-09T08:01:53Z")

</div>

Can i increase Max Heap Size that JAVA uses on my Raspberry Pi 3 B+ that i use just for OpenHAB.

Now when i add additional Bindings i get java.lang.OutOfMemoryError: Java heap space

/Mike

---

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [May 9, 2018, 12:28pm UTC](https://community.openhab.org/t/max-heap-size/44702/2 "2018-05-09T12:28:54Z")

</div>

The short answer is yes, there is a -X option you can pass to the JVM. However, I don’t know if that option exists for Zulu.

However, I’m more concerned there is something wrong. There are people running massive systems and not running it of heap.

How many bindings and Iten’s do you have? How much memory is there OHb process using? Does the memory used grow over time?

---

<div class="post-metadata">

**Author:** ![tnemrap](https://community.openhab.org/user_avatar/community.openhab.org/tnemrap/32/61523_2.png) [@tnemrap](https://community.openhab.org/u/tnemrap)\
**Post date:** [May 9, 2018, 9:45pm UTC](https://community.openhab.org/t/max-heap-size/44702/3 "2018-05-09T21:45:16Z")

</div>

It is the ipcamera binding that cause this for me.

/Mike

---

<div class="post-metadata">

**Author:** ![zacofunny](https://community.openhab.org/user_avatar/community.openhab.org/zacofunny/32/46537_2.png) [@zacofunny](https://community.openhab.org/u/zacofunny)\
**Post date:** [August 28, 2018, 5:32pm UTC](https://community.openhab.org/t/max-heap-size/44702/4 "2018-08-28T17:32:16Z")

</div>

Hi @tnemrap have you found solution for the issue? I also started to get out of memory errors for Java heap space with installed ipcamera binding. I guess @matt1 is required to solve the issue. Perhaps there is some bug causing memory leak.

---

<div class="post-metadata">

**Author:** ![matt1](https://community.openhab.org/user_avatar/community.openhab.org/matt1/32/19930_2.png) [@matt1](https://community.openhab.org/u/matt1)\
**Post date:** [August 29, 2018, 12:36am UTC](https://community.openhab.org/t/max-heap-size/44702/5 "2018-08-29T00:36:11Z")

</div>

> [@zacofunny](#):
>
> I guess @matt1 is required to solve the issue.

I have done a reply here

> [@IpCamera: New IP Camera Binding](https://community.openhab.org/t/ipcamera-new-ip-camera-binding/42771/446):
>
> See this post here on how I fixed this in my setup… This binding uses the image item in a more aggressive way than other bindings, as well as the amount of RAM that is used and requires garbage clean up is also very high. Possibly there are settings for garbage collection that could be tweaked, have not looked into this yet as I do not see the error since the post above. Recently I have been setting up a new Odroid C2 server because it has more RAM than a PI2 so I have been rebooting daily wh…

In addition I will need help narrowing down how to reproduce this and also what the cause is.

1. Is it a bug in my binding?
2. Is it a conflict with another binding?
3. Is it only happening with certain java version or type? Does Oracle java fix it?
4. Is the binding using the ITEM framework too often in a way that causes a bug in the framework to appear?
5. Is there something on the system that stops the garbage cleanup/collectors from running?
6. Is it only a particular brand/model of camera causing it?

Things like this need to be looked at until the cause is found, only after the cause is found can a fix be looked at.
