Fixing OpenSearch crashes and memory pressure under Shuffle

A practical guide to diagnosing OpenSearch restarts and high memory in a self-hosted Shuffle stack, with the checks, fixes and safe cleanup steps that prevent data loss.

On this page

Why OpenSearch crashes and memory pressure stall a Shuffle stack

When OpenSearch restarts or runs out of memory in a self-hosted Shuffle stack, the whole platform suffers. Shuffle keeps its working documents in OpenSearch as its document database, so the Go backend API on port 5001 depends on it to read and write workflows, execution records and the saved app credentials and API keys that Shuffle encrypts there. The architecture docs describe the server side as three parts: the frontend, the backend API and OpenSearch, while Orborus on the runtime side polls the backend for jobs and starts a worker for each execution. If OpenSearch stalls, the backend can fail health checks, new executions queue or hang, and app authentications appear broken even though the credentials themselves are intact. Teams usually need this page when the frontend shows errors after a container restart, when the OpenSearch container exits with out-of-memory messages, or when the host swaps heavily and every Shuffle action slows down.

OpenSearch is released under the Apache License, Version 2.0, and it is a fork of open source Elasticsearch 7.10. That means standard OpenSearch operating practice applies to the Shuffle database: kernel settings, heap sizing, index management, snapshots and security configuration all behave as they do for any OpenSearch cluster. Confirm the OpenSearch version your Shuffle release expects in the Shuffle configuration docs before you change anything, because the operational steps depend on it. Also confirm which OpenSearch security settings your deployment already uses, since authentication and TLS changes made during troubleshooting can lock out the backend.

Decide early whether this is a single-node fault or a capacity problem. A restart loop that clears after a kernel or ownership fix points to configuration, while steady growth in heap use and large execution indexes point to retention and sizing. Shuffle's high availability guidance recommends an OpenSearch cluster for resilience, so a single node on a busy platform is a risk to plan for before an incident. Record the current container memory limit, host memory and the size of the execution data before you change settings, so you can judge whether a fix worked and roll it back if it did not.

How a memory problem travels from OpenSearch to workflow runs

The backend writes execution documents to OpenSearch, and Orborus polls the backend for jobs and starts a worker for each run, which then starts app containers. When OpenSearch restarts or exhausts its heap, writes and reads stall, so runs look stuck even though the runtime is healthy. Check the OpenSearch container logs and heap usage first, then the backend errors that name the document store, before touching workflows.

Memory pressure in OpenSearch blocks the document path that backend and runtime depend on.

How to confirm OpenSearch is the cause before changing anything

This sequence separates an OpenSearch fault from a backend, runtime or application problem, so the team knows which layer to change before touching heap, kernel or index settings. Each step records a specific output that either confirms or rules out OpenSearch.

  1. Check container restarts and exit reasons

    Start by listing the state of every OpenSearch container or service and the backend that depends on it. Run docker ps -a or the equivalent Kubernetes pod listing, then inspect the restart count, last state and exit code for the OpenSearch container. An exit code that points to the kernel killing the process for memory, or a restart count that keeps climbing, supports an OpenSearch cause. If the OpenSearch container has been up with no restarts while the backend is failing, move the investigation to the backend and Orborus. Done when you have a written timeline of restarts with the exit reason for each one.

  2. Read OpenSearch logs for memory messages

    Pull the OpenSearch node logs for the same window as the restarts and search for out-of-memory errors, circuit breaker trips and garbage collection warnings. A circuit breaker message names the breaker and the bytes requested against its limit, which points to heap pressure. Repeated long garbage collection pauses before a restart point the same way. Note any bootstrap check failures that appear at startup, since those block the node before memory is ever exhausted. Done when each restart is matched to a log entry or you have confirmed that none exists.

  3. Check the kernel memory map setting

    Confirm the host value of vm.max_map_count on every node that runs OpenSearch, because a low value makes the node fail its bootstrap checks or crash under load. Read the value on the host and, where your platform allows it, from inside the container's namespace. Compare it with the minimum your OpenSearch version's install documentation requires. A value below the minimum is a kernel setting problem and explains a startup failure rather than a runtime crash. Done when you have the value from each node and a yes or no for each against the documented minimum.

  4. Check disk watermarks on each node

    Read disk usage per node from the cluster allocation and node stats output. OpenSearch stops allocating new shards to a node when disk use passes its low watermark, and it can make indices read-only when disk use passes the flood-stage watermark. Compare the reported free space with the watermark thresholds in your cluster settings. A node near a watermark with healthy heap means the fault is disk, not memory, and expanding storage or cleaning indices is the right next move. Done when every node has a recorded disk percentage and you know whether any watermark has been crossed.

  5. Check cluster health and heap on each node

    Query cluster health, then node stats for heap used, heap max and garbage collection counts on each node. A red or yellow status with unassigned shards, combined with heap use that stays near the configured maximum, indicates a heap problem. Heap that is low while the node still restarts suggests the problem sits elsewhere, such as the kernel setting or the disk. Record the heap ratio and the cluster status for each node at the time of the fault. Done when you can state, for each node, whether heap, disk or kernel is the likeliest cause.

  6. Compare with backend and Orborus errors

    Read the Shuffle backend logs for the same time window and look for failed calls to OpenSearch, timeouts, or errors on saving and loading executions. Check whether Orborus or the worker reports that it cannot write results. If the backend shows OpenSearch errors that line up with the node logs, OpenSearch is the cause. If the backend reports failures while OpenSearch stays healthy, look at network paths, credentials or the backend configuration first. Done when you have a short written statement that either links the backend errors to the OpenSearch events or rules them out.

  7. Record the findings before changing settings

    Write one summary that lists the restart timeline, the matching log entries, the kernel value, the disk percentages, the heap ratios and the backend errors. Assign the cause to one of the categories: heap, disk watermark, kernel setting, or something outside OpenSearch. Keep the raw outputs so a second engineer or your compliance reviewer can check the reasoning. Done when the summary names one primary cause and any secondary contributor, and the team agrees on the next change to make.

Four causes that show up most often under Shuffle

Most OpenSearch restarts and memory alarms in a Shuffle stack trace back to a small set of host and configuration problems. The cards below cover each cause, the check that confirms it, and the direction of the fix so you can work through them in order.

Host kernel settings

OpenSearch needs the host to allow a high number of memory map areas, and the install docs list vm.max_map_count among the host requirements. When it is too low, the node can fail its bootstrap checks or crash under indexing load. Check the value on every OpenSearch host, including the one running in a container, because the setting belongs to the kernel and is not reset by the container. Set it persistently with your host configuration management, then restart the affected service and confirm the node comes back healthy. Also review the other host requirements listed in the install docs for your OpenSearch version.

OpenSearch install docs

Data directory ownership

The OpenSearch process must own its data and log directories. When volumes are created by Docker, mounted from NFS or restored from a backup as root, the node can start, fail on first write and restart in a loop. Look for permission errors in the OpenSearch container or service log right before each restart, and compare the owner and mode of the data path with the user the process runs as. Fix the ownership on the host path or volume, not by widening permissions for everyone. After a restore, check ownership again before starting the cluster.

OpenSearch install docs

Heap size mismatched to host

The JVM heap is the most common source of memory pressure. A heap set above the memory available to the container gets the process killed by the kernel, while a heap set far too small makes garbage collection work constantly and slows Shuffle searches and writes. Compare the configured heap with the container or host memory limit and with what else runs on the same machine, including the Shuffle backend and Orborus. Ask your OpenSearch version's sizing guidance to confirm the appropriate ratio for your node count and data volume before changing it.

Execution indexes without retention

Shuffle stores workflow execution records in OpenSearch, and without a retention policy those indexes grow with every run. Large indexes consume heap for field mappings, slow searches and fill the disk, which then triggers restarts. Measure index sizes and document counts before deleting anything, and confirm which indexes hold execution history, saved credentials or other data the platform still needs. Establish a retention policy in the Shuffle configuration and set OpenSearch index management to match, and take a snapshot before any manual cleanup so a wrong delete can be reversed.

Shuffle configuration docs

Heap, retention and cluster options and when each fits

This table compares four ways to relieve OpenSearch memory pressure in a Shuffle stack: raising heap, adding a cluster node, reducing execution data retention and moving to a larger host. Read each row for the trade-off, the main risk and what to confirm before choosing, because the right fix often depends on whether the cause is heap sizing, index growth or a single undersized machine.

OptionTrade-offMain riskWhat to confirm first
Raise heap on a single nodeQuickest change to make, and it needs no new hardware if the host has spare RAMHeap set too close to host memory starves the OS and the Docker containers next to it, which can trigger restartsWhether host memory is actually free, the current heap setting, and whether garbage collection pressure or disk pressure is the real cause
Add a node to an OpenSearch clusterSpreads shards and load across machines, matching the high availability guidance in the Shuffle configuration docsA single-node setup moved to a cluster needs replicas, shard planning and network and TLS settings, so a rushed change can make things less stableWhether the Shuffle version and OpenSearch version support the topology, the number of nodes planned, and how shards and replicas will be placed
Reduce execution data retentionLowers the amount of stored execution data without new hardware, but removes history operators may needDeleting indexes or documents by hand can break searches, dashboards, audit trails or workflow history that Shuffle still readsWhich indexes hold execution data, the retention period your audit and incident process requires, and the Shuffle-supported way to change it
Move to a larger hostGives more memory, CPU and disk in one step, and suits a single-server install that has outgrown its hostDowntime during migration, and a larger host does not fix unbounded index growth if retention stays unchangedCurrent memory and disk trend, the migration window you can accept, and whether snapshots exist before the move

How to clean up oversized execution indexes safely

Do not delete OpenSearch indexes by hand until you know which ones hold workflow execution history and which ones hold configuration. In a Shuffle stack, the index names are the first thing to check, but they are not a reliable guide on their own. Saved app credentials and API keys are stored in OpenSearch and encrypted with the SHUFFLE_ENCRYPTION_MODIFIER secret, so an index that looks like clutter may hold the records that let your apps authenticate. Deleting the wrong one can break integrations that worked the day before, and removing execution history can also remove the audit trail your incident reviews and compliance evidence depend on.

Before any delete, take an OpenSearch snapshot of the cluster and confirm it can be restored. Record the snapshot name, the repository it was written to, and the time it completed. Then list the indexes with the OpenSearch cat indices API and map each one to its role: execution and workflow run data, workflow definitions, apps and credentials, users and settings. Shuffle's configuration documentation at Shuffle configuration docs is the place to confirm the index layout for your Shuffle version, since this varies between releases. Treat any index you cannot identify as configuration until a vendor or engineer confirms otherwise.

Rehearse the cleanup in a non-production copy first. Restore the snapshot into a separate OpenSearch instance, point a test Shuffle backend at it, and run the same retention or delete commands there. Check that workflows still load, that saved app authentications still work, and that recent execution history is still searchable. Only then schedule the change in production, in a maintenance window, with the rollback path written down. For the full snapshot, restore and rehearsal procedure, follow the backup and restore topic in this group.

How the fix differs for Compose, Swarm and Kubernetes

On the single-server architecture in Shuffle's architecture docs, OpenSearch runs as a container next to the backend, frontend and Orborus on one host. Containers share the host kernel, so the kernel setting that OpenSearch needs is applied on that host itself, not inside the container. Heap and data paths are set in the Compose file and on the host filesystem, so you can review every change in one place.

  • Kernel settings: Apply the virtual memory setting with sysctl on the Docker host and persist it in a file under /etc/sysctl.d so it survives a reboot. Confirm the required value in the installation docs for your OpenSearch version.
  • Heap size: Set the JVM heap through OPENSEARCH_JAVA_OPTS in the OpenSearch service environment of your Compose file, and keep the heap well below the container memory limit.
  • Data volume ownership: Bind-mounted data directories must be owned by the user ID the OpenSearch image runs as. Confirm that ID in the image documentation before you change ownership.
  • Restart evidence: Check the container's last state and docker compose logs opensearch for out-of-memory kills, so you can tell a memory problem from a failed startup check.
  • One change at a time: Restart only the OpenSearch service after each change so you can see which setting resolved the problem.

Before you restart, confirm the sysctl value on the host, the heap in the running container and that the data directory owner matches the image user.

Security and operational risks while fixing OpenSearch

OpenSearch holds the execution history, credentials and case data that Shuffle depends on, so fixing a crash or memory problem can create new exposure if it is done in a hurry. The cards below cover the controls to keep in place, the shortcuts to avoid and the change process that keeps a production cluster recoverable.

Port exposure and network boundaries

OpenSearch listens on its own ports in addition to the Shuffle backend, and a troubleshooting session often opens them for direct access with curl or a dashboard. Confirm which ports are published on the host or load balancer, restrict them to the backend, Orborus nodes and administrators, and close any temporary rule you added during the incident. Check that the cluster is not reachable from the internet or from app containers that have no business querying it.

Access control through the Security plugin

The OpenSearch Security plugin provides role-based access control, document-level and field-level security, and audit logs. Confirm that the Shuffle backend uses a dedicated service account with only the index permissions it needs, and that administrative accounts are separate from it. Review who holds cluster-wide rights before and after the change, because a crash investigation often leads someone to grant broader access than the fix requires.

OpenSearch security docs

TLS for node and client traffic

The Security plugin can encrypt node-to-node and client traffic with TLS. Keep TLS on while diagnosing, and when you replace certificates after a failure, verify the new chain on every node and on the Shuffle backend before restarting anything else. Mismatched certificates often look like a cluster that will not form, which tempts teams to disable TLS to get a green status. Record which certificate authority and expiry dates each node uses.

Never disable security to get past errors

Turning off the security plugin, removing TLS or setting the cluster to accept anonymous access may clear an authentication error, but it leaves the search cluster holding case data and stored credentials open to anyone who reaches it. Treat any setting that lowers security as a temporary finding that needs a ticket, an owner and a removal date. Ask whether the error can be fixed by correcting a certificate path, a password or a role mapping instead.

Protecting the encryption secret

Shuffle encrypts saved app credentials and API keys in OpenSearch with AES-256 using the SHUFFLE_ENCRYPTION_MODIFIER secret. Losing or changing that value breaks every saved app authentication. Before you rebuild containers, move volumes or rotate passwords, confirm that the value in your .env file or secret store is unchanged and backed up separately from the OpenSearch data. Never copy it into tickets or chat during the incident.

Shuffle configuration docs

Change control for production clusters

Put each change to the production cluster through a written plan: the symptom, the single change, the rollback step, the person who approves it and the window in which it runs. Take a snapshot before deleting or reindexing execution data, and test the same steps on a copy of the cluster first. Record every setting you touched so the post-incident review can confirm nothing temporary remains in place.

Questions teams ask about OpenSearch crashes under Shuffle

What drives the cost of fixing OpenSearch crashes under Shuffle?

The main cost driver is how many layers are involved: the host kernel and container settings, OpenSearch ownership and permissions, heap sizing, index growth from execution history, and any cluster design choices. A fix that is a single kernel setting costs far less than a fix that needs index lifecycle redesign and a restore rehearsal. Fixed-scope engagements are agreed in writing before work starts, so ask for a quote that lists each layer, the systems in scope, and whether retesting and documentation are included. Ask whether the work is one-time or whether a retainer for ongoing checks is also proposed, since those costs recur.

How long does diagnosing an OpenSearch restart in Shuffle usually take?

Diagnosis length depends on the cause. A host setting problem, such as a kernel memory map limit or a volume owned by the wrong user, is usually found from container logs and host checks. Memory pressure from an oversized execution index takes longer, because the team must confirm index sizes, retention settings and how Shuffle writes execution data before changing anything. No duration figure is supplied for this work, so ask any provider to state the diagnosis steps and the evidence it expects to collect, and to separate diagnosis from the cleanup that follows.

What does the work need from our team?

Plan for access and evidence before the work starts. A typical request includes:

  • Read access to Docker or Kubernetes logs for the OpenSearch, backend and Orborus containers
  • Shell or cluster access on the hosts that run OpenSearch, so kernel and volume settings can be checked
  • Current .env values and the OpenSearch heap configuration, with secrets redacted
  • A maintenance window, because restarts and index changes affect running workflows
  • A verified OpenSearch snapshot taken before any cleanup, so deleted data can be restored

Confirm with your provider how they handle credentials and where logs are stored, since these files can contain sensitive detail.

Can our own team fix OpenSearch memory pressure in Shuffle without a partner?

Yes, if your engineers can read container logs, check host kernel settings and understand OpenSearch index management. Start by confirming the OpenSearch version and the Shuffle release in use, because supported versions and upgrade paths differ. Take a snapshot first, then inspect index sizes and retention before deleting anything. Partner help is most useful when the root cause spans several layers, when the cluster must stay available during the fix, or when the team needs documented evidence for an internal or external review. The Shuffle configuration docs describe the OpenSearch setup your team should compare against.

When is a partner worth bringing in for Shuffle OpenSearch trouble?

A partner is usually worth it when restarts recur after a first fix, when the cluster is part of a high availability design, or when a failed cleanup could remove execution history that an incident investigation needs. It also helps when the OpenSearch stack is shared with other tools, since index changes can affect more than Shuffle. Ask whether the partner will document the root cause, the changes made and the rollback steps, and whether a follow-up check is included after the fix.

Is the cleanup of execution indexes safe to run during business hours?

It is safest in a maintenance window with a fresh, verified snapshot. Deleting or reindexing execution data can interrupt running workflows and remove records that teams use to audit past runs. Confirm which indexes hold execution history, which retention rules apply, and whether any compliance obligation requires keeping those records. Test the cleanup against a copy of the data where possible, and confirm the restore steps before the change.

Does the OpenSearch version matter when diagnosing crashes?

Yes. OpenSearch is a fork of Elasticsearch 7.10, and its releases move on a regular schedule with maintenance periods that end on set dates. Versions in maintenance receive bug fixes and security patches but no new features. Check which OpenSearch release your stack runs against the OpenSearch releases page and confirm with Shuffle's release notes that your Shuffle version supports it, before you plan an upgrade as part of the fix.

Will the fix involve our Shuffle encryption secret or saved app credentials?

It should not need to change them, but it is worth confirming. Shuffle encrypts saved app credentials in OpenSearch using the SHUFFLE_ENCRYPTION_MODIFIER value, and changing or losing that value breaks every saved app authentication. Any work that touches .env files, OpenSearch data directories or restores must preserve this value. Ask your provider to confirm in writing that the secret stays untouched, and that it is included in your backup set.

How DeployOpen scopes an OpenSearch stabilization engagement

DeployOpen engagements are fixed-scope: the scope, deliverables and timelines are agreed in writing before any work starts, and the quote follows from that written scope. For an OpenSearch stabilization, the scope should name the specific OpenSearch nodes, the Shuffle servers that depend on them, the host and container platform, and the symptoms being investigated, such as restarts, heap exhaustion, or disk and memory alerts. Work happens inside your own infrastructure, whether that is your cloud accounts, data centers or air-gapped network, so access, change windows and the rules for touching production indexes are agreed in the same document.

Before scoping, confirm what you can provide: read access to node logs and the OpenSearch cluster and node stats, the opensearch.yml and jvm.options files from each node, the Docker or Kubernetes manifests that set memory limits and the vm.max_map_count value, and the Shuffle version and docker-compose or Helm configuration in use. You should also name an owner who can approve index deletions or snapshot restores, and confirm whether you hold a current snapshot repository. Ask whether the work includes a written rollback plan for each change and a retest of the Shuffle execution path after fixes are applied.

In return, you should receive a written findings report that records the root cause of each restart or memory problem, the configuration changes made and why, a list of indexes cleaned up with the retention rule applied, and the runbook steps your team needs to repeat the checks later. Ask any partner to state in the quote which items are one-time deliverables and which need an ongoing retainer, such as upgrades or continuous monitoring. DeployOpen prepares these systems and evidence but does not issue audit reports or certifications, so confirm early which compliance evidence, if any, your assessors will expect.

How DeployOpen works on Shuffle and OpenSearch operations

DeployOpen approaches OpenSearch crashes and memory pressure in a Shuffle stack as a scoped piece of work inside your own infrastructure. We start from the evidence your team can collect, change one setting at a time, and document each step so your operators can repeat it.

How we scope

  • We review your Shuffle deployment layout, OpenSearch version and host kernel settings before agreeing what the fix covers.
  • The written scope names the hosts, containers, indexes and retention rules in play, with any cleanup kept out unless you approve it.
  • Engagements are fixed-scope, so deliverables and timelines are agreed in writing before work starts, and ongoing support is available as a retainer.

How we build

  • We reproduce restarts and memory growth in a staging copy, then check kernel, ownership and heap settings against the OpenSearch install guidance.
  • Index size, retention and execution data are measured first, so any cleanup targets known consumers and is rehearsed on a copy.
  • Every configuration change is tested for its effect on Shuffle backend behavior and recorded with the before and after values.

How we hand over

  • You receive a runbook covering the checks, the settings changed, the cleanup steps and the rollback for each one.
  • Backup and snapshot steps are confirmed before any index deletion, and we document where the snapshot was taken and how to restore it.
  • Your operators walk through the runbook with us, and the findings list records what remains open and who owns it.

How we support

  • Retainers cover upgrades to newer OpenSearch and Shuffle releases, with changes tested in staging before production.
  • Ongoing support can include periodic memory and index-size reviews, so growth is caught before the next restart.
  • Questions about your own environment, such as your SLA or retention obligations, are confirmed with your team and recorded in the scope.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.