# High CPU and restarts after upgrade to OH4

**URL:** <https://community.openhab.org/t/high-cpu-and-restarts-after-upgrade-to-oh4/148250>\
**Category:** Off-Topic\
**Tags:** openhab4\
**Created:** [July 31, 2023, 8:04am UTC](https://community.openhab.org/t/high-cpu-and-restarts-after-upgrade-to-oh4/148250 "2023-07-31T08:04:57Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![helmar74](https://community.openhab.org/user_avatar/community.openhab.org/helmar74/32/7319_2.png) [@helmar74](https://community.openhab.org/u/helmar74)\
**Post date:** [August 1, 2023, 4:44am UTC](https://community.openhab.org/t/high-cpu-and-restarts-after-upgrade-to-oh4/148250/4 "2023-08-01T04:44:39Z")

</div>

Are you running out of Memory?

MAybe you have a look here:

> [@openHAB 4 migration FAQ](https://community.openhab.org/t/openhab-4-migration-faq/148144#restartssluggishness-45):
>
> Seeing many issues related to openHAB 4.0 migration, sometimes duplicated, I thought maybe it might help to create an overview of the different issues and their current status. Therefore I have compiled this initial FAQ based on observations. Before upgrading, please read: [Upgrade Process](https://github.com/openhab/openhab-distro/releases/tag/4.0.0#upgrade-process)[Breaking Changes that Require Manual Interaction after the Upgrade](https://github.com/openhab/openhab-distro/releases/tag/4.0.0#breaking-changes-that-require-manual-interaction-after-the-upgrade)Index [openHABian upgrade failing due to Java upgrade](#openhabian-upgrade-failing-due-to-java-upgrade-3)[TransformationService of type ‘JS’ is unavailable](#transformationservice-of-type-js-is-unavailable-8)[ScriptEngine for language ‘applica…](#scriptengine-for-language-applicationjavascript-not-found-12)

> [@Very High Memory Usage and frequent restarts with OH4](https://community.openhab.org/t/very-high-memory-usage-and-frequent-restarts-with-oh4/148010):
>
> Since I upgraded from 3.4.4 to 4.0, I have noticed that everything is very s l o w. Memory usage is high, though processor usage appears low: [image] And openHAB restarts on its own frequently. I get an email from iCloud every time the binding reconnects after a restart, and I have received 76 since I upgraded the evening of July 23. (I have no reason to think the iCloud binding is causing the problem, I only mention it because the email from iCloud is an easy way to track it). There is not…

Maybe you should increase in /etc/default/openhab:

```yaml
EXTRA_JAVA_OPTS=“-Xms900m -Xmx2000m”

```

Of course depending on your hardware…

---

_[View the full topic](https://community.openhab.org/t/high-cpu-and-restarts-after-upgrade-to-oh4/148250)._
