Troubleshooting
Why an edge PC freezes when telemetry stops but CPU is low
Short answer
When telemetry stops while CPU stays low and the local console is frozen, the edge PC is running out of memory, not losing its network: in the reported installation a remote-access agent (TeamViewer) grew resident memory until the system locked. Stop and disable that service with systemctl, confirm the htop trend stays flat, then fix the two ports that share one subnet and one gateway.
On this page
When telemetry stops arriving while the CPU trace stays low, and a screen plugged into the box shows a frozen desktop, the edge PC is stalling on memory — it has not dropped off the Ethernet. In the installation behind this checklist, a remote-access agent, the TeamViewer service, kept growing resident memory until the whole system locked, and stopping and disabling that service ended the freezes. The port addressing is a genuine second defect — both Ethernet ports sit in one subnet and announce the same gateway — but it explains lost connections, never a frozen console. Classify at the local console first, work the memory trend second, fix the routes third.
Classify the failure at the local console #
A missing sample at the history end proves the telemetry chain stopped delivering. Node-RED execution, the MQTT connection, the Ethernet path, the receiving side and the operating system can all break that chain, and only the local console tells you which one broke.
- Keep a display attached and a local login working for the whole investigation; you cannot classify a freeze through a connection that is itself down.
- At the next stop, move the mouse and run a command. A frozen desktop means a system-wide stall: go to the memory trend. A session that answers means the network path: go to the subnet check.
- Write down the failure time and line it up with the last delivered sample and the system journal, so every observation belongs to one event.
- Try every access path you have while the failure is present, and note which ones answer.
| What you observe | What it points to | Where to go |
|---|---|---|
| Telemetry stops, local console answers | Broker connection or network path | The subnet check |
| Console frozen too, CPU low | Memory exhaustion | The memory trend |
| Second port answers once, then never again | Unstable routing, no recovery path | The subnet check |
| One process's resident memory climbs for days | A leak in that process | Stop and disable it |
Find the process behind the stall #
Record what the unit actually runs before changing anything — the reported installation paired a Buster image with Node-RED 2.2.2 — as a baseline that identifies one installation, not an affected version range.
- Keep the workload comparable while you watch: leave the Node-RED flows running, so a fall in memory use reflects your fix and not the stopped automation.
- Run htop sorted by resident memory and compare the remote-access agent against Node-RED and everything else across checks hours apart; this leak took days to matter, so one snapshot proves nothing. Note per-process resident memory, total use and available memory each time.
- Low CPU clears nothing: an allocation leak consumes RAM without load, and once available memory runs out the whole system can stall before anything reaches the log. Search the journal with journalctl for out-of-memory kills and service exits around the freeze time anyway.
- In the reported installation the grower in htop was the TeamViewer agent.
Before you stop any service or reboot the box, put the machine it controls in a safe state; a paused data collector recovers, an unexpected change on the outputs does not. Then stop the service itself with systemctl stop and systemctl disable, each followed by the unit name the package installed, reboot once, and confirm it stays gone. The agent's own off switch does not hold: in the reported case it launched again after being switched off from its interface.
Check eth0 and eth1 for an overlap at 10.1.1.0/24 #
The inputs are exactly what the reported unit's dhcpcd.conf carried:
interface wlan0
metric 100
interface eth0
static ip_address=10.1.1.105/24
static routers=10.1.1.1
interface eth1
static ip_address=10.1.1.106/24
static routers=10.1.1.1
eth0 is the main link to the plant PC, eth1 is a debug port that is usually unplugged, and wlan0 is a USB Wi-Fi adapter for downloading nodes, whose metric line only biases that adapter's own routes.
The rule, in words: an interface's network is its address with the mask applied. A /24 mask keeps the first three octets as the network and leaves the fourth for the hosts, and a gateway belongs on a network the interface actually sits in.
The arithmetic:
- eth0: 10.1.1.105 with mask 255.255.255.0 keeps 10.1.1.0 as its network; the hosts run from 10.1.1.1 to 10.1.1.254.
- eth1: 10.1.1.106 with the same mask lands on that same 10.1.1.0.
- The gateway 10.1.1.1 sits inside the shared network, so both blocks can announce it, and both do.
Result: two ports share one subnet, and the same next hop is installed through both. Replies toward the LAN can leave by either port, both addresses answer address resolution on both links, and while eth1 has no cable the duplicate default route is dormant; the moment one goes in, it comes alive and can pull traffic off the main port.
Decision: whenever two interfaces compute the same network, exactly one keeps a default gateway. Delete the static routers line from the eth1 block — a debug link to one laptop needs an address, not a default route — or move eth1 onto its own subnet. Do it after the memory fix, in that order: this defect loses connections, it does not freeze a console.
Confirm the fix, then close each case #
Wait for evidence, not for a quiet day. After the change the reported installation ran weeks without a leak, crash or freeze, and a second unit with the agent disabled reached an uptime of 33 days; that is the size of quiet period to wait for. If a unit that freezes this way comes up for replacement anyway, a fanless mini PC for the cabinet is the like-for-like swap, classified from its own console the same way.
The decision for each case:
- Console frozen, CPU low, one process climbing in htop: memory exhaustion. Stop and disable that service, and take a resident-memory trend that stays flat for weeks as your proof.
- Console answering while telemetry still dies: the network path. Apply the one-gateway rule from the subnet check and read the active routes while the failure is present.
- A different process doing the growing: an application leak, and Node-RED crash and memory growth with systemd restart recovery covers that side.
- CPU high instead of low: a different fault, and high CPU usage in a Node-RED agent is that procedure.
Questions asked
Why would a memory freeze leave nothing in the log?
The out-of-memory killer logs only when it fires, and a box can stall before reaching that point. With available memory gone and no swap to fall back on, the kernel keeps reclaiming the same pages, disk queues back up, and the console dies with nothing written. That is why resident-memory readings taken in htop before the freeze are stronger evidence than an empty journal.
Is switching the agent off in its own settings enough?
No. An interface setting inside the agent does not stop the service unit that brings it up at boot, which is why the process reappeared in the reported case. Stop and disable that unit with systemctl, reboot once, then confirm the unit shows as disabled in the service list and the process is absent in htop before you call it fixed.
Can the second Ethernet port serve as a recovery path?
The second port answered once in the reported case and then refused after later reboots, because both ports sit in one subnet with the same gateway, so a cable in the debug port does not guarantee the kernel answers there. Test it during an actual failure before relying on it, and keep a local display as the dependable way in.
Does the Wi-Fi adapter's metric settle which route wins?
Only for that adapter's own routes. The metric pulls preference toward the Wi-Fi link while it is associated, but the active routing table decides, not the configuration file. Two wired ports claiming one subnet and one gateway produce competing routes that the Wi-Fi setting never touches. Read the table with every intended cable connected and check the chosen path to the LAN PC and to the broker.
How long should I watch before calling the freeze fixed?
Longer than the old failure interval, by a wide margin. One comparable freeze report ran cleanly for ten days before failing daily, so a quiet week proves little. Set the watch at several weeks minimum, log every htop check with the workload unchanged, and treat the first repeat freeze as a new classification, not a failed fix.