Skip to main content
This guide explains how to configure resource limits for OpenHands Enterprise components. Proper resource configuration ensures stable operation and prevents issues like OOMKills and pod evictions.

Values File Structure

All configuration examples in this guide show keys that belong in your site-values.yaml file. The examples show the complete path from the root of the file.
Create a site-values.yaml file to store your custom configuration. Pass it to Helm with -f site-values.yaml when installing or upgrading.

Understanding Kubernetes Resources

Kubernetes uses two key resource settings:
  • Requests: The minimum resources guaranteed to a pod. The scheduler uses this to place pods on nodes with sufficient capacity.
  • Limits: The maximum resources a pod can use. Exceeding memory limits causes an OOMKill; exceeding CPU limits causes throttling.
If a pod uses significantly more memory than its request (but below its limit), it becomes a candidate for eviction during node pressure. Set requests close to actual usage for production workloads.

Application Server Resources

The OpenHands application server (deployment name: openhands) handles the UI, API, and agent orchestration. Configure its resources under the deployment section in your values file.

Default Configuration

For production workloads, increase memory and add replicas for redundancy:

When to Adjust

Increase resources if you observe:

Horizontal Pod Autoscaling

For automatic scaling based on load, enable the HorizontalPodAutoscaler:

Sandbox Resources

Sandboxes (also called runtimes) are the isolated containers where agents execute code. Each conversation runs in its own sandbox pod. Configure these via environment variables in the runtime-api.env section.

Available Settings

Default Configuration

High-Resource Configuration

For workloads that require more resources (large codebases, memory-intensive builds):

Resource Format

  • Memory: Use Mi suffix (mebibytes). Examples: 1024Mi, 4096Mi, 8192Mi
  • CPU: Use millicores. 1000m = 1 CPU core. Examples: 500m, 2000m, 4000m
  • Storage: Use Gi suffix (gibibytes). Examples: 10Gi, 50Gi, 100Gi
Changes to sandbox resources only affect new sandboxes. Existing running sandboxes keep their original limits until stopped and restarted.

Applying Changes

1. Update your values file

Edit site-values.yaml with your desired configuration:

2. Apply with Helm upgrade

Verifying Changes

Check application server resources

Check replica count

Check runtime-api environment variables

Verify the sandbox resource settings are configured in the runtime-api deployment:

Monitoring Resource Usage

Current resource consumption

Resource usage over time

For production deployments, we recommend integrating with a monitoring solution (Prometheus/Grafana, Datadog, etc.) to track:
  • Memory usage vs. limits (to predict OOMKills)
  • Memory usage vs. requests (to predict evictions)
  • CPU throttling events
  • Pod restart counts

Next Steps

K8s Install Overview

Return to the Kubernetes installation overview.

Enterprise Overview

Learn more about OpenHands Enterprise features.