Troubleshooting
Node-RED reports device full when the edge PC card fills
Short answer
The deploy error means the filesystem behind Node-RED's user directory has no space left, not that the editor is broken. Read df -h to confirm, expand unused card space where the OS provides the option, then run du -h to find the writer — retained messages, logs or a database. Check load-side supply voltage before rewriting a card that also hangs at boot.
On this page
- Why does Node-RED report device full on deploy?
- How do I check the free space on the card?
- Why is the filesystem smaller than the card?
- What is filling the card?
- Why didn't deleting the nodes free the space?
- Why can I reach every website but not the Node-RED editor?
- Why does the edge PC hang just before the desktop appears?
- When should I rebuild the card, and when should I replace the box?
- Questions asked
A Node-RED deploy that fails with a "device full, write" message is a storage fault, not an editor fault: the filesystem behind the user directory has no space for the write, so the runtime refuses the deployment and keeps the last good flow. Confirm it in one command with df -h, claim the card space the image never took where the OS provides an expansion option, then run du -h to name the writer — a retained-message branch, a log directory or a database on the same card. Deleting nodes in the editor frees nothing, because the files are already on disk. If the box also hangs just before the desktop appears, measure the voltage at the board's power input under load before rewriting anything, because a sagging cable produces the same symptom.
Why does Node-RED report device full on deploy? #
The message means the runtime tried to write the flow files and found no writable space on the device backing them, so a full or read-only filesystem is the first suspect, and the flows, the editor and the network are not.
On every deploy the runtime saves the flow configuration and its credentials file under the user directory — /home/pi/.node-red on a single-user install, for example — together with anything the flows persist: context storage, files a node writes, rows a database branch inserts. When the filesystem holding that directory reaches zero available space, the write fails and the editor surfaces the device-full wording. Nothing in the flow logic or the wiring causes it, and freeing space on a different mounted device does not help, because the deploy writes to one filesystem only.
A full device is the common case but not the only one. A worn card can drop its filesystem to read-only to protect what is left, and a read-only mount fails the same deploy with free space still showing in df -h; the mount command lists each filesystem as read-write or read-only. The two cases share one first step: read the capacity, then read the mounts, before touching the flows.
How do I check the free space on the card? #
Run df -h on the device and read the row whose mount point is /: it reports size, used and available space and the use percentage of the filesystem that holds the Node-RED user directory and the system logs, and an available value of 0 confirms the fault.
The -h flag prints the same numbers in human-readable units, so a gigabyte column reads as G instead of raw block counts; plain df works when you only need the totals. On a card sold as 16 GB, a root row reading 15G total, 15G used, 0 available at 100 percent is a confirmed full filesystem — treat that as the shape to look for, not a fixed expectation, because real totals vary with the image.
Two readings decide the next step. If the root filesystem is full, go and find the writer. If the root filesystem is far smaller than the card, the image never claimed the unused space, and the expansion path below applies. Re-read df -h after every change: a number that falls again within hours means an active writer is still running, and capacity work alone will not hold.
Why is the filesystem smaller than the card? #
A flashed image keeps the root filesystem at the size it was built with, so a card sold as 16 GB can present 15 GiB or less until you expand it; where the OS ships raspi-config, the Expand Filesystem entry assigns the unused remainder, and a NOOBS install cannot use it.
The rest of the card sits unpartitioned until something claims it. On an edge PC running Raspberry Pi OS, raspi-config holds the entry: Advanced Options, then A1 Expand Filesystem, then reboot. The menu numbering moves between OS releases, so read the option labels rather than the numbers. Run df -h before and after; once the reboot completes, the root row should show the card's usable capacity instead of the image's original size.
The expansion path has two limits worth naming. A card installed with NOOBS cannot use the expand option, because that installer lays out a recovery partition scheme of its own; rebuild such a card from a plain OS image if the space matters. And expansion only assigns space the card actually has: a card whose root row stays far below its nominal size after expansion, or that fills again days after a clean rebuild, is mislabeled or worn, and no setting repairs it — source replacement cards from a distributor you can hold to the specification.
Card-backed storage on an edge PC fails in a recognizable family of ways once write endurance runs out; we traced one of them in the Docker OCI runtime create failed on SD card storage fault.
What is filling the card? #
Run du -h from the top of the full filesystem and follow the largest totals downward: on a plant edge PC the growth almost always sits in retained message storage, a log directory or a database file, and the number beside each directory names the writer.
du -h sums disk usage per directory. On a plant edge PC the suspects are short: the Node-RED user directory, /var/log, and any database or message-store directory an earlier project left behind — a database installed months ago can still be the real consumer while Node-RED merely reports the full device.
Work the diagnosis in this order:
- Record the free space with
df -h. - Run
du -hand descend into the largest directories, including the user directory,/var/logand any database or email-store paths. - Pause the suspected writer through its normal controls — disable the trigger that fires it, do not delete nodes.
- Let the flow run for an hour and compare both readings.
- Archive or delete only disposable content, then confirm the freed space with
df -h.
An email branch deserves its own look, because receiving and retaining are different faults. A flow that forwards a level on every change is harmless until some branch keeps a copy: a file node writing each message, a context store set to persist, a database insert, or an email-in node that keeps what it fetched — a single poll of a large mailbox can add a mailbox's worth of content. The same growth pattern fills historian storage on edge hosts; we traced it for Ignition Edge historian data that fills the disk before pruning.
And when Node-RED runs in a container, its writes land on a host-mounted path; a mis-set mount announces itself as the Node-RED Docker EACCES mkdir write error, not as a full device.
Why didn't deleting the nodes free the space? #
Deleting a node changes the next deployment, not the disk: messages, log lines and database rows already written stay on the card, and when the deploy itself fails on a full filesystem, the editor's change may never reach the disk at all.
Stop the writer at its source, then free space at the file level. Disable the branch that produces the content — the inject that fires it, the trigger behind it — and let the runtime save that change only once the capacity check passes, or edit the flow file directly from a shell if the editor cannot deploy.
Keep configuration and disposable history apart. Before deleting anything, copy the user directory to another machine or a USB stick: the flows, the credentials beside them and the context storage are the recoverable state, and a misdirected cleanup command in /var/log does not care what you meant to delete. After cleanup, two results need explaining:
- The space does not appear: a running process still holds the deleted files open, and the space returns when that process restarts.
- The numbers disagree between
dfanddu: the measurement crossed onto another mounted filesystem, so read the two tools against the same mount point.
Why can I reach every website but not the Node-RED editor? #
Reaching outside websites tests the browser's route to the internet, not the editor on the edge PC, so test the editor on the box itself first; if it opens there the fault is addressing or networking, and if it does not the runtime or its storage is.
The runtime serves the editor over HTTP on port 1880 by default, and it prints the address when it starts. Read that startup line and the box's current network address, then compare them with the URL in the browser, port included. A rebuilt box is a common trap here: a fresh install on the same hardware can pick up a different address from DHCP, and an old bookmark then points at a device that no longer exists.
Decide from the local-versus-remote split:
- Editor opens on the box but not from your workstation: the address, the port or the path between them — check which device now owns the address you typed.
- Editor fails on the box too: the runtime or its storage, and the console output at that moment names the failing operation.
- Console scrolls connection errors from one of the flow's client connections while the editor itself loads fine: that is a separate fault in that connection, and it does not block a deploy.
Why does the edge PC hang just before the desktop appears? #
A hang at that point has two live candidates, a supply that sags under the load of the full desktop startup or storage that can no longer take writes, and a voltage reading at the board's power input while it loads separates them before a rewrite.
Measure at the board's power input, not at the supply's terminals: cable resistance, connector resistance and poor terminations sit between the two points, and the loss follows voltage drop = current × resistance. A supply with an industrial rating on its label does not remove what its cable adds. Probe only the low-voltage DC side, and leave mains work to a qualified person.
Worked example: take a board that draws 2 A at its input from a 5.1 V supply through a cable and two connectors adding 0.3 Ω of round-trip resistance. The drop is 2 A × 0.3 Ω = 0.6 V, so the board sees 4.5 V while the meter at the supply still reads 5.1 V. The desktop startup raises the current above the idle draw, the drop grows with it, and a cable that idles quietly can sag exactly where the boot needs headroom. Read the current figure and the input tolerance from your board's documentation, and use that tolerance as the pass line.
Three readings, three decisions:
- Supply terminals read their rating but the board input sags under load: the cable, connectors or terminations are the loss — swap in a short, known-good cable and re-measure.
- Supply output and board input both sag: the supply or its upstream feed cannot carry the load — check its capacity against the board's documented requirement.
- Board input holds within its documented range under load: power is cleared, and the hang belongs to storage — go back to
df -hand the card.
Run this check before rewriting the card, because a fresh image lands on the same cable and the same supply.
When should I rebuild the card, and when should I replace the box? #
Rebuild the card when df -h and du -h explain the fill and power checks pass; replace the box when a known-good card still fills, drops to read-only or hangs after a clean image, because the storage itself is the fault.
The rebuild order that holds: back up the user directory, reimage from a plain OS image rather than a NOOBS-style layout, run the expansion entry, restore the flows, then cap every writer — retention limits on the system log, bounded context storage, retention on any database — and re-read df -h after a full day of running. A rebuild without capped writers just resets the countdown.
Replace the hardware when the pattern repeats on a known-good card: a device that logs continuously cannot tolerate a storage medium that fails closed. When the repair is not worth repeating, the same role belongs on a fanless industrial mini PC, with the writers capped before the new box goes into service.
Questions asked
Does it change anything if Node-RED runs in Docker on the same box?
The full-device logic is the same, because a container writes to the host filesystem through a mounted volume. Check which host path the container mounts before you measure anything: a missing or wrong mount announces itself as a permission or missing-path failure rather than a full device, and no amount of card expansion repairs a mount that was never made.
What should I copy off the box before I clean or reimage the card?
Copy the whole Node-RED user directory rather than exporting flows from the editor: the flow file, the credentials file beside it and any context storage live there, and the credentials key sits in the same directory. Keep those files together, because flows restored without their key lose every stored credential.
How much free space should an edge PC keep on its card?
Plan a working reserve of about 20 percent of the card, roughly 3 GB on a 16 GB card, and treat that reserve line as an alarm threshold. The reserve buys the time between a writer misbehaving and writes failing, so one retention backlog cannot reach zero and fail a deploy during a shift.
How do I size storage for a flow that stores what it receives?
Multiply the stored message count by the size of one stored message, then apply the retention period. A branch that files 200 messages of 50 KB each day adds about 10 MB each day, so 30 days of retention needs about 300 MB before filesystem overhead. Cap the retention first, then make sure the cap fits inside the free-space reserve.