node-red / node-red/node-red-docker
Node-RED-docker causes regular CPU spikes
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Shell
- Sterne
- 540
- Forks
- 434
- Ø Merge
- 24 Min.
- Gemergte PRs (30 T.)
- 5
Beschreibung
I have recently noticed that a closely monitored docker container using image nodered/node-red:latest (2.1.3) shows, on the processor core (or thread ?) it uses, CPU spikes up to 100% every 30 minutes. My monitoring happens by polling docker stats regularly and graphing it over time. This also occurs if the container is fresh, i.e. with no active flows, no third-party libraries installed, no custom code, etc.

A fuller writeup, with many helpful comments from community members, is available on the Node-RED Forum. When reading through it, bear in mind that the suspicion that Node-RED crashed my system was false.
A quick summary of the salient findings:
- other Node.js containers on my system do not show these spikes.
- manually inserted GC calls do not mitigate the issue, making it unlikely to be related to Node.js GC
- other users can reproduce spikes, whether they're on Docker or not
Given the replies and confirmations that the issue was reproducible, I believe that my environment is irrelevant, but here goes: I am running on a system with an Intel Celeron N3350 processor with 4GB of memory. The OS is Ubuntu 20.04 LTS and I am running Docker version 19.03.8, build afacb8b7f0.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, das Problem mit einem frischen nodered/node-red:latest-Container (2.1.3) zu reproduzieren und ihn wie im Bericht beschrieben mit docker stats zu überwachen. Vergleiche das Verhalten mit und ohne aktive Flows und Bibliotheken von Drittanbietern; abgeschlossen ist die Aufgabe, wenn die Ursache des wiederkehrenden 30-minute CPU spike identifiziert und bestätigt wurde, dass dieser nicht mehr auftritt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- docker, node.js
- Bereich
- devops, infrastructure
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100