> For the complete documentation index, see [llms.txt](https://docs.openiam.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openiam.com/troubleshooting/performance/increasing-ram.md).

# Increasing memory for OpenIAM services

This document explains how to increase memory to accommodate OpenIAM services.

| Symptom                                                                                       | Likely cause                                                    | Resolution                       |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | -------------------------------- |
| A synchronization or reconciliation times out on more than one account                        | The service's heap ceiling is too low for the volume            | Raise it for that service, below |
| A synchronization revisits the same accounts without progressing, and only a restart stops it | The same                                                        | The same                         |
| Provisioning stalls under load, or parallel approvals back up                                 | `idm` and `workflow` need more memory when work arrives in bulk | The same                         |

Each service has its own heap ceiling, so the one to raise is the one showing the symptom. [Check memory utilization](/troubleshooting/performance/memoryutili.md) shows what each is currently allowed and what it is using.

{% hint style="info" %}
**Repeat the procedure for every service you are raising.** Each is configured separately, and raising one does not affect the others. Account for the total against the host: raising every service on a host that is already short of memory moves the failure rather than fixing it.
{% endhint %}

## RPM

{% hint style="info" %}
**On Kubernetes, memory is a deployment setting rather than a troubleshooting step.** Heap and container limits are set per service in the deployment configuration — see [Tuning](/installation/tuning.md).
{% endhint %}

The example below raises the ESB service from 2 GB to 4 GB. Every other service is the same procedure against its own unit file.

{% stepper %}
{% step %}
**Confirm the cluster and services are running** before changing anything.

```bash
openiam-cli status
```

Check the `esb` process:

```bash
ps aux | grep -i esb
```

And the service itself:

```bash
systemctl status openiam-esb
```

{% endstep %}

{% step %}
**Stop the OpenIAM services**, then verify they are down.

```bash
openiam-cli stop
openiam-cli status
```

{% endstep %}

{% step %}
**Read the service's current allocation.** `systemctl status` shows the heap the unit is running with — here `-Xmx4096m`, on the `start.sh` line:

{% code overflow="wrap" expandable="true" %}

```
[root@rhel9 system]# systemctl status openiam-esb
● openiam-esb.service - OpenIAM ESB module
     Loaded: loaded (/etc/systemd/system/openiam-esb.service; disabled; preset: disabled)
     Active: active (running) since Mon 2025-02-03 12:47:12 UTC; 17min ago
TriggeredBy: ● openiam-esb.timer
   Main PID: 34383 (start.sh)
      Tasks: 1895 (limit: 407811)
     Memory: 2.2G
        CPU: 4min 33.270s
     CGroup: /system.slice/openiam-esb.service
             ├─34383 /bin/bash /usr/local/openiam/services/start.sh openiam-esb "-Xmx4096m -Djdk.tls.client.protocols=TLSv1.2"
             └─34389 /usr/local/openiam/jdk/bin/java -Dlogging.level.org.elasticsearch.client=ERROR -Dlogging.level.root=ERRO>

Feb 03 12:47:12 rhel9 systemd[1]: Started OpenIAM ESB module.
Feb 03 12:47:12 rhel9 start.sh[34383]: green
Feb 03 12:47:23 rhel9 start.sh[34389]: WARNING: An illegal reflective access operation has occurred
Feb 03 12:47:23 rhel9 start.sh[34389]: WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (jar:>
Feb 03 12:47:23 rhel9 start.sh[34389]: WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.refl>
Feb 03 12:47:23 rhel9 start.sh[34389]: WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective ac>
Feb 03 12:47:23 rhel9 start.sh[34389]: WARNING: All illegal access operations will be denied in a future release

[root@rhel9 system]#
```

{% endcode %}

The same value is in the unit file:

```bash
cat /etc/systemd/system/openiam-esb.service
```

{% endstep %}

{% step %}
**Edit the unit file** and change the `-Xmx` value on the `ExecStart` line.

```bash
vi /etc/systemd/system/openiam-esb.service
```

Before:

{% code overflow="wrap" %}

```
ExecStart=/usr/local/openiam/services/start.sh openiam-esb "-Xmx2048m -Djdk.tls.client.protocols=TLSv1.2"
```

{% endcode %}

After:

{% code overflow="wrap" %}

```
ExecStart=/usr/local/openiam/services/start.sh openiam-esb "-Xmx4096m -Djdk.tls.client.protocols=TLSv1.2"
```

{% endcode %}
{% endstep %}

{% step %}
**Reload systemd and restart the service** so the new ceiling takes effect.

```bash
sudo systemctl daemon-reload
sudo systemctl restart openiam-esb
sudo systemctl status openiam-esb
```

Then start OpenIAM and confirm the process is back:

```bash
openiam-cli start
ps aux | grep -i esb
openiam-cli status
```

{% endstep %}

{% step %}
**Repeat for each service you are raising**, against its own unit file. The units are:

```
/etc/systemd/system/openiam.service
/etc/systemd/system/openiam-esb.service
/etc/systemd/system/openiam-idm.service
/etc/systemd/system/openiam-ui.service
/etc/systemd/system/openiam-workflow.service
/etc/systemd/system/openiam-auth.service
/etc/systemd/system/openiam-device.service
/etc/systemd/system/openiam-reconciliation.service
/etc/systemd/system/openiam-synchronization.service
/etc/systemd/system/openiam-groovy.service
/etc/systemd/system/openiam-email.service
/etc/systemd/system/openiam-sas.service
/etc/systemd/system/openiam-business-rule.service
/etc/systemd/system/openiam-adapter@.service
/etc/systemd/system/openiam-connector@.service
```

Each has a matching `systemctl status openiam-<service>` for checking it afterwards.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
**Check each service came back.** `-Xmx` is a ceiling the host has to be able to honour, so confirm the service is running after the restart rather than assuming it. One that does not come back says why in its own log — a heap larger than the machine can give it fails at start-up, not later.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.openiam.com/troubleshooting/performance/increasing-ram.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
