Recovering when the NiFi content repository fills the disk

When the content repository runs out of space, NiFi stops accepting new flowfile content and flows stall. This page explains how archive back pressure produces that stall, how to free space without losing data, and which layout and threshold changes prevent a repeat.

On this page

Why a full NiFi content repository stalls every flow

When the disk holding the content repository fills, NiFi cannot write new FlowFile content, so every processor that creates or changes content stops, and the connections feeding it back up until the whole flow stalls. The fix starts with knowing what the repository holds and why deleting files by hand is risky. Your team needs this recovery and prevention work when disk alerts fire, when flows stop without an obvious processor error, or after a flow change that increases the volume of content NiFi keeps on disk.

The content repository stores the bytes of each FlowFile, while the FlowFile repository stores attributes and queue state, and provenance is kept separately. Content is written into shared claim files, so a single large claim can stay on disk while even one small FlowFile still references it. When archiving is enabled, NiFi keeps the content of completed FlowFiles so it can be replayed, and it trims that archive as space is needed. Archive data is still counted against the same volume, so an archive that is not trimmed in time can contribute to back pressure just like active content does.

Before changing anything, confirm which content repository directories sit on which volumes, which archive settings are in effect, and how back pressure applies to the repository in your version. The NiFi System Administrator's Guide documents these properties and is the reference to check against your own nifi.properties. Treat disk usage as a capacity risk to plan for, not as a one-time cleanup, because the decisions about layout, thresholds and monitoring determine whether the next spike stops flows again.

Recovery and prevention options and when each fits

This table compares the main ways to recover from a full content repository and stop it from filling again, with the risk each one carries. Read each row as a decision: what the option fixes, what it can break, and what to confirm in your environment before you act. The main takeaway is that the fastest fixes, such as deleting content files by hand, carry the highest risk to flows and provenance, so confirm the cause first.

OptionWhen it fitsRiskWhat to confirm
Expand or move the content repository volumeThe disk is genuinely too small for steady-state volume and the data is still healthyGrowing a volume in place may need downtime or a filesystem change; moving it needs a safe stop and a correct path update in nifi.propertiesWhether your platform can resize the volume online, and the maintenance window your flows allow
Adjust archive retention and size thresholds in nifi.propertiesArchived content is the main consumer and flows do not need old content for replay or provenanceLowering retention removes content that replay, provenance lookups or audits may still needWhich flows use replay and how long provenance content must be available to your investigators
Reduce inbound volumeA source spike or a misrouted feed is the root cause and the flow can tolerate throttlingUpstream sources may drop or retry data, and throttling can hide a design problemSource retry behavior, backlog tolerance and who approves pausing a feed
Tune connection back pressure thresholdsQueues grow faster than downstream systems drain them and you need earlier, bounded bufferingHigher thresholds let more content accumulate on disk; lower thresholds can stall upstream processorsObject count and size limits on each critical connection, and the downstream rate you expect
Separate repositories onto different disksContent, FlowFile and provenance repositories compete for one volume and I/O or space is sharedAdds storage to manage, and a wrong path or permission can stop the node from startingMount points, filesystem permissions and how each repository is monitored for free space
Clear content by hand from the repository directoriesAlmost never, and only as a last resort after a full backup and a stopped nodeCorrupts FlowFile references, breaks provenance and can leave the node unable to recoverWhether a verified backup exists and whether your support path covers a manual change

Safe steps to free space on a running NiFi

This sequence brings a NiFi node with a full content repository back to normal operation without losing flowfile state or corrupting repositories. It captures evidence first, frees space through configuration and supported flow controls, and ends with confirmed queue drain and cleared back pressure.

  1. Stop or pause inbound sources

    Pause the processors and remote ports that create new content, starting with the ingest points that feed the largest queues. Coordinate with the owners of upstream systems so they hold or buffer data rather than resend it. The step is done when the flow shows no new flowfiles entering the affected connections and the content repository usage stops climbing over an observation window your team chooses.

  2. Capture diagnostics and disk state

    Before changing anything, record disk usage for each repository directory, the NiFi bulletins, and the connection queue sizes and back pressure status. Generate a NiFi diagnostics report and keep a copy of the logs and the nifi.properties file. Keep these files off the affected volume where possible. The step is done when your team can point to a saved snapshot that shows which repository and which connections are full.

  3. Confirm which files are safe to touch

    Identify the repository directories from nifi.properties and confirm which ones sit on the full volume. Treat the content, flowfile and provenance repositories as NiFi-owned state, and do not delete or move their files by hand, because NiFi tracks the references in its own metadata. Ask your platform team whether snapshots or backups of the volume exist. The step is done when the owner of each directory and the rule for changing it are written down and agreed.

  4. Free space through supported configuration

    Use supported controls to release disk space: reduce the archive retention settings for the content repository, let existing archived content age out under the configured limits, or drain and empty specific queues through the UI so the normal cleanup runs. Where a queue must be emptied, prefer routing flowfiles to a reviewed destination or a documented discard path, and record what was removed. The step is done when disk usage falls and NiFi reports that the content repository has space again.

  5. Restart or let the node recover

    If a node is unresponsive or the repository became inconsistent, restart it cleanly using the standard shutdown, which writes diagnostics on exit where configured. Check the startup logs for repository recovery messages before reopening flows. In a cluster, confirm the other nodes are healthy first and avoid restarting several nodes at once. The step is done when the node reports connected status and the logs show no repository corruption errors.

  6. Resume inbound sources in controlled steps

    Re-enable the processors and ports you paused, one group at a time, beginning with the flows that have the lowest volume. Watch the queue depth and disk usage after each group starts. Restore the upstream senders once the internal flows are stable. The step is done when each group runs without new bulletins and disk usage stays within the level you set for it.

  7. Verify queues drain and back pressure clears

    Confirm that every connection that was full now drains, that back pressure indicators are off, and that the content repository usage holds steady under normal load. Review the bulletins and the provenance for errors introduced during recovery. Record the final state in your incident notes. The step is done when queues reach normal levels, no connection reports back pressure, and the remediation decisions are documented for the next review.

Which repository layout changes stop it happening again

Recovery only holds if the same failure cannot repeat. The measures below work together: separate volumes contain the damage, early warnings give people time to act, and clear ownership makes sure someone responds. Each one trades setup effort and storage planning against the cost of another stalled flow.

Separate volumes for each repository

Place the content, FlowFile and provenance repositories on their own volumes so that a filling content repository cannot starve the FlowFile repository or the logs on the same disk. Check the repository paths in nifi.properties on every node, and confirm that no two of them resolve to the same mount point. The trade-off is more volumes to size, monitor and back up, which is usually worth it in production.

Free space alerts before thresholds

Alert on free space well before a disk reaches the level where NiFi starts refusing work, and page on the trend as well as the level. A volume that gains space slowly is less urgent than one losing space by the hour. Confirm that the alert covers every node, not only the primary, because one node can fill while the others look healthy.

Archive limits matched to disk

Set the content archive size and retention so that the archive, plus the active content, fits within the disk with headroom for bursts. Archive settings are a trade-off between replay ability and disk safety: a longer archive helps troubleshooting but can keep the disk full long after a problem is fixed. Review the values against the actual volume size, not the size assumed when the flow was first built.

Sizing for inbound burst volume

Size the content volume for the peak inbound volume a source can send during an outage or replay, not the average day. A source that backlogs for hours and then floods the flow can fill a disk that looked adequate in normal running. Ask each data owner for the largest burst they can produce and how long it can last, then test that case before go-live.

Early warnings from predictions and bulletins

Enable NiFi's queue predictions and route bulletins to the people who act on them, so back pressure warnings arrive while there is still time to respond. Predictions are estimates, so treat them as early signals and confirm how they behave in your own flows before relying on them for paging. Noisy processors can flood bulletin channels, so tune levels first to keep the warnings readable.

Named owner for each volume

Record who owns each repository volume, who receives its alerts and who can approve a change to its size or archive settings. Without a named owner, a full-disk alert can sit unanswered while each team assumes another is handling it. Keep this record in the same place as the runbook so that on-call staff can find it during an incident.

Questions teams ask before fixing a full NiFi content repository

How long does it take to recover a NiFi node with a full content repository?

No duration can be stated from the supplied facts, and the honest answer depends on the flow. Recovery time is driven by how much content is held, how quickly the team can identify which connections and queues are holding it, whether the node can be stopped safely, and how many nodes in the cluster are affected. A node with one oversized archive and a clear owner is a very different job from a cluster where several flows are backed up across shared storage. Ask any partner for a scope that names the diagnostic steps, the nodes covered and the change windows needed, then compare the quote against that list rather than a headline number.

Can our own team recover a full content repository without outside help?

Often yes, if the team has someone who understands the flow and can work in the NiFi UI, the operating system and the node's file layout. The risky parts are deleting content by hand, stopping nodes in the wrong order and changing thresholds without checking how they interact. Outside help is most useful when the cause is unclear, when several clusters share one storage system, or when the team cannot take a change window. Whichever route you choose, decide who owns each step before the incident starts, and write down the diagnostics you will collect first.

What access and diagnostics does a recovery need from our team?

Expect to provide read access to the NiFi UI and its status and provenance views, shell access to each node with rights to inspect the repository directories and disk usage, and a copy of the relevant configuration files such as nifi.properties. You will also need a named contact who can approve pausing flows or restarting nodes, and a record of recent flow changes. Diagnostics such as a NiFi diagnostics bundle, the bulletin history and disk usage snapshots help separate a sudden surge from a slow leak. Ask the partner to list every access item and where credentials will be held before work starts.

Do we lose data when the team frees space in the content repository?

It depends on what is removed and how. Content claims that belong to flowfiles still in queues are needed for those flowfiles to be processed, so deleting them by hand can cause data loss or corrupt provenance. Archived content is kept for replay and audit, so removing it may end the ability to replay those events. The safer approach is to fix the consumer that is blocking the queue, let the flow drain, and only then let the framework clean up according to its retention settings. Confirm with the partner how they will protect provenance and any records you must keep, and whether a backup is taken before any deletion.

How do we stop the content repository from filling the disk again?

Prevention combines layout, thresholds and monitoring. Place the content repository on storage sized for peak backlog, separate from the flow and provenance repositories where your architecture allows it. Review archive settings and back pressure thresholds so that a downstream outage slows ingestion before the disk is exhausted. Alert on disk usage and queue growth early enough for someone to act. Also check that the flows themselves handle errors and timeouts, because a stuck processor is the most common cause of growth. Ask for a written threshold table with the values chosen for your workload, not defaults copied from a guide.

What does a fixed-scope engagement cover for a full content repository?

A fixed-scope engagement sets out, in writing before work starts, which nodes and flows are covered, the diagnostic steps, the recovery actions, the threshold and layout changes, the verification tests and the handover notes. It also states what is excluded, such as fixing business logic in custom processors or upgrading NiFi itself. DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms in your own infrastructure, and most engagements are fixed-scope. Ongoing monitoring or upgrade work can be arranged as a retainer. DeployOpen does not publish prices, so a quote follows from the agreed scope.

What drives the cost of recovering a NiFi content repository?

The main cost drivers are the number of nodes and clusters affected, the number of flows that hold content, how many owners must approve each change, and whether recovery must happen inside a set change window. Prevention work adds cost for layout changes, threshold tuning and alert design, and it is usually a one-time piece followed by lower ongoing effort for monitoring. Ask any quote to separate one-time recovery, one-time hardening and any recurring support, and to state which of your teams must be available during the work.

Security and access risks during disk recovery

Recovery work on a full content repository puts people in direct contact with configuration, raw flow content and diagnostic output, all of which can carry sensitive data. The cards below cover who may change configuration and delete files, how changes are recorded, how cleanup avoids exposing content, how diagnostics leave the environment, and how the UI is limited while a node recovers.

Control who edits nifi.properties

Changes to nifi.properties can move repositories, change thresholds or disable protections, so they should not be made by whoever happens to be on the bridge call. Limit write access on the file to the small group that runs NiFi, and confirm which service account owns the process. Before a change, record the current file hash so a reviewer can see what moved. Check that a temporary change to a threshold is reverted once the disk is stable.

Restrict deletion of repository files

Deleting files under the content, provenance or flowfile repository by hand bypasses NiFi's bookkeeping and can leave the flow with references to content that no longer exists. Only the NiFi service account should have write access to these directories, and operators should not run ad hoc cleanup scripts as root. Confirm that any manual removal is approved in writing and performed on a stopped node with a backup taken first.

Keep an audit trail of changes

During an incident, many small actions happen quickly: a threshold is raised, a queue is emptied, a processor is stopped. Record who made each change, when, and why, in a ticket or change log outside the NiFi host. NiFi's own user and application logs help reconstruct events, but confirm that they are shipped off the node and retained long enough for a post-incident review by your security team.

Protect content during cleanup

Content claims often hold the original payloads of records, such as personal data, card data or patient information. Inspecting or copying them to a shared scratch area during cleanup creates a new copy outside the controls that already protect the flow. Agree in advance who may read content, do triage on metadata where possible, and securely delete any extracted samples when the incident closes.

Scrub diagnostics before sending them

Diagnostic bundles and thread dumps can include processor properties, controller service settings, parameter values and environment details that contain credentials or tokens. Review the output before it leaves your environment, and confirm with your support provider how they handle it. Sensitive parameters should be marked as sensitive in the flow so they are masked, and any value that did leak should be rotated.

Limit UI access during recovery

A node that is short on disk may be restarted, reconfigured or left in a partial state, and a recovering node should not be reachable by everyone who can reach the network. Keep the UI bound to a restricted interface or behind your access controls, and confirm which authentication provider is active before the node comes back. Re-enable normal access only after the node has rejoined and its flow state has been checked.

What a managed recovery and prevention engagement covers

A managed engagement on a full content repository starts with a written scope that separates the incident from the prevention work. The incident part covers diagnosing what filled the disk: which connections were in archive back pressure, whether the nifi.content.repository.archive.max.usage.percentage threshold or the disk itself was the trigger, which flows generated the bulk of the content claims, and whether provenance and log directories contributed. The recovery part covers a runbook that names the order of actions, the people who approve each one, and the state to capture before any file is removed. Prevention covers repository layout (keeping content, provenance and flowfile repositories on separate volumes where the hardware allows), threshold and retention changes, and the alerts that would have given earlier warning. Each item is listed in the statement of work with its deliverable, so the client can see exactly what is and is not included before work begins.

Throughout the engagement, your infrastructure, change windows and NiFi operators stay in control. DeployOpen works in the environments you provide and makes changes only through the change process you approve, with your operators running or observing the commands. Handoff items are agreed up front: the runbook, the configuration diff, the monitoring rules for queue depth, repository usage and back pressure, and a verification record showing that the restored node or cluster processed a test load with the new thresholds in place. Confirm with your own team which metrics exist in your monitoring stack, which system owns alert routing, and who signs off on deleting content in production. Pricing and duration follow from that written scope and your environment, so ask for a quote that lists each deliverable and the assumptions behind it.

How DeployOpen scopes and supports NiFi recovery work

DeployOpen treats a full content repository as an operations incident and a design problem at the same time. We start from your running NiFi, its repository layout and the flows that write the most content, then agree in writing what recovery and prevention work will cover.

How we scope

  • Review content repository location, disk capacity and current archive and retention settings on each node
  • Map which flows and processors create the largest content claims and where archive back pressure begins
  • Agree in writing whether the work covers one recovery, threshold and layout changes, or both, as a fixed-scope engagement

How we build

  • Prepare a recovery runbook that frees space without deleting provenance or in-flight content
  • Test threshold, archive and repository layout changes in a non-production NiFi before touching production
  • Verify each change by checking queue drain, disk headroom and back pressure behavior under representative load

How we hand over

  • Deliver the written runbook, configuration changes and a record of every threshold and path that was altered
  • Walk your operations team through disk alerts, the recovery steps and the decisions behind the new layout
  • Document what to confirm with your storage team, such as volume sizing and snapshot behavior, before go-live

How we support

  • Offer ongoing support and upgrades as a retainer, scoped separately from the original engagement
  • Review disk trends and archive settings when flows change or new processors are added to the canvas
  • Schedule periodic checks of repository usage and alert thresholds so capacity issues surface before writes stop

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.