# On-prem runtime and performance issues
This guide covers memory-related issues that can occur during the runtime of the on-prem agent (OPA). These include heap space errors and crashes caused by large API responses.
# Java heap space errors
The following error log indicates the agent has reached its memory limit:
java.lang.OutOfMemoryError: Java heap space
This error indicates that OPA doesn't have enough memory to process large jobs or payloads. By default, the heap size is set to a fraction of available system memory.
Open the run.sh
file and adjust the -Xmx
flag to resolve the issue. For example, you can increase it to -Xmx10G
to allocate 10 GB of heap memory.
# High memory usage from large responses
The agent may crash or slow down when it buffers large API responses in memory. By default, it loads entire responses during execution, which increases memory usage.
OPA version 2.7.1 and later allows you to disable response buffering in the configuration file by adding the following flag to your config.yml
:
agent:
disable_response_buffering: true
Last updated: 5/29/2025, 10:25:55 PM