Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. JS:Out of memory

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    JS:Out of memory

    This topic has been deleted. Only users with topic management privileges can see it.
    • OliverIO
      OliverIO @valbuz last edited by

      @valbuz sagte in JS:Out of memory:

      Was meinst Du zu:

      FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node-red]
      

      Die Ausgabe in der Zeit von
      2021-06-10 14:35:46.551 bis 2021-06-10 14:35:52.112
      ist die Ausgabe des Stacktrace.
      da im Programmablauf ausgehend von einem Programmstart eine funktion aufgerufen wird, aus dieser Funktion wieder eine Funktion aufgerufen wird und aus dieser Funktion wieder eine andere aufgerufen wird, entsteht daraus eine wichtige Information an welcher Stelle des Programmcodes man sich gerade befindet.
      Aus den Funktionsbezeichnungen kann man dann Informationen ableiten.
      Der Stacktrace muss von unten nach oben gelesen werden
      Die Ausgabe bei 2021-06-10 14:35:46.566 mit der Nr 18 ist der Ursprung.
      Wenn man von da aus nach oben liest:
      17,16,15 da steht was mit Compile, ergo mus NodeRed Javascript/JSON lesen und interpretieren (kompilieren)
      14: Parse, auch hier will er etwas erkennen
      13: AstValueFactory, AST ist ein Begriff wie man Programmcode strukturiert als Daten ablegen kann https://en.wikipedia.org/wiki/Abstract_syntax_tree
      7-11: Hier wird versucht Daten in einer Variable abzulegen.
      6: Hier wird versucht den Speicher zu reservieren
      1-4: Hier entsteht der Fehler, er wird ausgegeben und es wird abgebrochen

      Falls du im log (also die Zeilen vor diesem Stacktrace) nicht genug Informationen hast, kannst du auch mal das loglevel von nodered erhöhen
      https://nodered.org/docs/user-guide/runtime/logging
      und es auf debug oder gar trace zu setzen. Mit trace aber vorsichtig sein, da das wirklich viel Ausgabe erzeugen kann. Aber das hängt von den Entwicklern von nodered ab.
      Die settings-datei für iobroker zu nodered findest du hier

      /opt/iobroker/node_modules/iobroker.node-red/settings.js
      

      aber zeigt doch erst mal die bisherigen logdaten 2-5 sekunden vor diesem Abschnitt

      V 1 Reply Last reply Reply Quote 0
      • V
        valbuz @OliverIO last edited by

        @oliverio
        Danke für Deine Antwort.

        Hier noch der gewünschte Auszug, paar sekunden zurück..
        Den Loglevel hochschrauben ist schon gut, nur ich weiss ja nicht wann der Restart kommt...
        Heute morgen wieder 2x kurz hintereinander und jetzt wieder alles stabil.
        Die Instanz hatte ich auf "silly" gestellt, jedoch nicht mehr Infos erhalten.

        2021-06-10 14:03:00.007  - info: javascript.0 (9318) script.js.common.PV_Boiler: PV Aktuell: 5.077
        2021-06-10 14:03:00.007  - info: javascript.0 (9318) script.js.common.PV_Boiler: Verbrauch Aktuell: 0.444
        2021-06-10 14:06:00.007  - info: javascript.0 (9318) script.js.common.PV_Boiler: Boiler ON!
        2021-06-10 14:06:00.007  - info: javascript.0 (9318) script.js.common.PV_Boiler: PV Aktuell: 5.041
        2021-06-10 14:06:00.007  - info: javascript.0 (9318) script.js.common.PV_Boiler: Verbrauch Aktuell: 0.454
        2021-06-10 14:09:00.007  - info: javascript.0 (9318) script.js.common.PV_Boiler: Boiler ON!
        2021-06-10 14:09:00.007  - info: javascript.0 (9318) script.js.common.PV_Boiler: PV Aktuell: 4.995
        2021-06-10 14:09:00.008  - info: javascript.0 (9318) script.js.common.PV_Boiler: Verbrauch Aktuell: 0.432
        2021-06-10 14:12:00.013  - info: javascript.0 (9318) script.js.common.PV_Boiler: Boiler ON!
        2021-06-10 14:12:00.013  - info: javascript.0 (9318) script.js.common.PV_Boiler: PV Aktuell: 4.957
        2021-06-10 14:12:00.013  - info: javascript.0 (9318) script.js.common.PV_Boiler: Verbrauch Aktuell: 0.438
        2021-06-10 14:15:00.014  - info: javascript.0 (9318) script.js.common.PV_Boiler: Boiler ON!
        2021-06-10 14:15:00.014  - info: javascript.0 (9318) script.js.common.PV_Boiler: PV Aktuell: 4.932
        2021-06-10 14:15:00.014  - info: javascript.0 (9318) script.js.common.PV_Boiler: Verbrauch Aktuell: 0.434
        2021-06-10 14:15:00.020  - info: host.ioBroker-zw instance system.adapter.coronavirus-statistics.0 started with pid 14231
        2021-06-10 14:15:00.530  - info: coronavirus-statistics.0 (14231) starting. Version 0.6.3 in /opt/iobroker/node_modules/iobroker.coronavirus-statistics, node: v12.22.1, js-controller: 3.2.16
        2021-06-10 14:15:02.471  - warn: coronavirus-statistics.0 (14231) State attribute definition missing for + undefined
        2021-06-10 14:15:03.396  - info: coronavirus-statistics.0 (14231) Terminated (ADAPTER_REQUESTED_TERMINATION): Without reason
        2021-06-10 14:15:03.909  - info: host.ioBroker-zw instance system.adapter.coronavirus-statistics.0 terminated with code 11 (ADAPTER_REQUESTED_TERMINATION)
        2021-06-10 14:18:00.006  - info: javascript.0 (9318) script.js.common.PV_Boiler: Boiler ON!
        2021-06-10 14:18:00.006  - info: javascript.0 (9318) script.js.common.PV_Boiler: PV Aktuell: 4.92
        2021-06-10 14:18:00.006  - info: javascript.0 (9318) script.js.common.PV_Boiler: Verbrauch Aktuell: 0.434
        2021-06-10 14:20:00.022  - info: host.ioBroker-zw instance system.adapter.daswetter.0 started with pid 14335
        2021-06-10 14:20:00.550  - info: daswetter.0 (14335) starting. Version 3.0.7 in /opt/iobroker/node_modules/iobroker.daswetter, node: v12.22.1, js-controller: 3.2.16
        2021-06-10 14:20:04.799  - info: daswetter.0 (14335) Terminated (NO_ERROR): Without reason
        2021-06-10 14:20:05.306  - info: daswetter.0 (14335) cleaned everything up...
        2021-06-10 14:20:05.312  - info: host.ioBroker-zw instance system.adapter.daswetter.0 terminated with code 0 (NO_ERROR)
        2021-06-10 14:21:00.010  - info: javascript.0 (9318) script.js.common.PV_Boiler: Boiler ON!
        2021-06-10 14:21:00.010  - info: javascript.0 (9318) script.js.common.PV_Boiler: PV Aktuell: 4.863
        2021-06-10 14:21:00.010  - info: javascript.0 (9318) script.js.common.PV_Boiler: Verbrauch Aktuell: 0.435
        2021-06-10 14:24:00.006  - info: javascript.0 (9318) script.js.common.PV_Boiler: Boiler ON!
        2021-06-10 14:24:00.006  - info: javascript.0 (9318) script.js.common.PV_Boiler: PV Aktuell: 4.867
        2021-06-10 14:24:00.006  - info: javascript.0 (9318) script.js.common.PV_Boiler: Verbrauch Aktuell: 0.447
        2021-06-10 14:27:00.007  - info: javascript.0 (9318) script.js.common.PV_Boiler: Boiler ON!
        2021-06-10 14:27:00.007  - info: javascript.0 (9318) script.js.common.PV_Boiler: PV Aktuell: 4.289
        2021-06-10 14:27:00.007  - info: javascript.0 (9318) script.js.common.PV_Boiler: Verbrauch Aktuell: 0.41
        2021-06-10 14:30:00.009  - info: javascript.0 (9318) script.js.common.PV_Boiler: Boiler ON!
        2021-06-10 14:30:00.009  - info: javascript.0 (9318) script.js.common.PV_Boiler: PV Aktuell: 4.915
        2021-06-10 14:30:00.009  - info: javascript.0 (9318) script.js.common.PV_Boiler: Verbrauch Aktuell: 0.43
        2021-06-10 14:30:00.019  - info: host.ioBroker-zw instance system.adapter.coronavirus-statistics.0 started with pid 14521
        2021-06-10 14:30:00.533  - info: coronavirus-statistics.0 (14521) starting. Version 0.6.3 in /opt/iobroker/node_modules/iobroker.coronavirus-statistics, node: v12.22.1, js-controller: 3.2.16
        2021-06-10 14:30:04.025  - warn: coronavirus-statistics.0 (14521) State attribute definition missing for + undefined
        2021-06-10 14:30:04.967  - info: coronavirus-statistics.0 (14521) Terminated (ADAPTER_REQUESTED_TERMINATION): Without reason
        2021-06-10 14:30:05.497  - info: host.ioBroker-zw instance system.adapter.coronavirus-statistics.0 terminated with code 11 (ADAPTER_REQUESTED_TERMINATION)
        2021-06-10 14:30:43.426  - info: javascript.0 (9318) script.js.common.Astro: neue Tagezeit: Nachmittag
        2021-06-10 14:30:43.426  - info: javascript.0 (9318) script.js.common.Astro: nächte kommende Tagezeit: Abenddämmerung
        2021-06-10 14:33:00.010  - info: javascript.0 (9318) script.js.common.PV_Boiler: Boiler ON!
        2021-06-10 14:33:00.011  - info: javascript.0 (9318) script.js.common.PV_Boiler: PV Aktuell: 4.879
        2021-06-10 14:33:00.011  - info: javascript.0 (9318) script.js.common.PV_Boiler: Verbrauch Aktuell: 0.356
        2021-06-10 14:35:45.979  - debug: node-red.0 (31383) 10 Jun 14:35:45 - [info] Stopping modified nodes
        
        OliverIO 1 Reply Last reply Reply Quote 0
        • OliverIO
          OliverIO @valbuz last edited by OliverIO

          @valbuz said in JS:Out of memory:

          @oliverio
          Danke für Deine Antwort.

          Hier noch der gewünschte Auszug, paar sekunden zurück..
          Den Loglevel hochschrauben ist schon gut, nur ich weiss ja nicht wann der Restart kommt...
          Heute morgen wieder 2x kurz hintereinander und jetzt wieder alles stabil.
          Die Instanz hatte ich auf "silly" gestellt, jedoch nicht mehr Infos erhalten.

          2021-06-10 14:03:00.007  - info: javascript.0 (9318) script.js.common.PV_Boiler: PV Aktuell: 5.077
          2021-06-10 14:03:00.007  - info: javascript.0 (9318) script.js.common.PV_Boiler: Verbrauch Aktuell: 0.444
          2021-06-10 14:06:00.007  - info: javascript.0 (9318) script.js.common.PV_Boiler: Boiler ON!
          2021-06-10 14:06:00.007  - info: javascript.0 (9318) script.js.common.PV_Boiler: PV Aktuell: 5.041
          2021-06-10 14:06:00.007  - info: javascript.0 (9318) script.js.common.PV_Boiler: Verbrauch Aktuell: 0.454
          2021-06-10 14:09:00.007  - info: javascript.0 (9318) script.js.common.PV_Boiler: Boiler ON!
          2021-06-10 14:09:00.007  - info: javascript.0 (9318) script.js.common.PV_Boiler: PV Aktuell: 4.995
          2021-06-10 14:09:00.008  - info: javascript.0 (9318) script.js.common.PV_Boiler: Verbrauch Aktuell: 0.432
          2021-06-10 14:12:00.013  - info: javascript.0 (9318) script.js.common.PV_Boiler: Boiler ON!
          2021-06-10 14:12:00.013  - info: javascript.0 (9318) script.js.common.PV_Boiler: PV Aktuell: 4.957
          2021-06-10 14:12:00.013  - info: javascript.0 (9318) script.js.common.PV_Boiler: Verbrauch Aktuell: 0.438
          2021-06-10 14:15:00.014  - info: javascript.0 (9318) script.js.common.PV_Boiler: Boiler ON!
          2021-06-10 14:15:00.014  - info: javascript.0 (9318) script.js.common.PV_Boiler: PV Aktuell: 4.932
          2021-06-10 14:15:00.014  - info: javascript.0 (9318) script.js.common.PV_Boiler: Verbrauch Aktuell: 0.434
          2021-06-10 14:15:00.020  - info: host.ioBroker-zw instance system.adapter.coronavirus-statistics.0 started with pid 14231
          2021-06-10 14:15:00.530  - info: coronavirus-statistics.0 (14231) starting. Version 0.6.3 in /opt/iobroker/node_modules/iobroker.coronavirus-statistics, node: v12.22.1, js-controller: 3.2.16
          2021-06-10 14:15:02.471  - warn: coronavirus-statistics.0 (14231) State attribute definition missing for + undefined
          2021-06-10 14:15:03.396  - info: coronavirus-statistics.0 (14231) Terminated (ADAPTER_REQUESTED_TERMINATION): Without reason
          2021-06-10 14:15:03.909  - info: host.ioBroker-zw instance system.adapter.coronavirus-statistics.0 terminated with code 11 (ADAPTER_REQUESTED_TERMINATION)
          2021-06-10 14:18:00.006  - info: javascript.0 (9318) script.js.common.PV_Boiler: Boiler ON!
          2021-06-10 14:18:00.006  - info: javascript.0 (9318) script.js.common.PV_Boiler: PV Aktuell: 4.92
          2021-06-10 14:18:00.006  - info: javascript.0 (9318) script.js.common.PV_Boiler: Verbrauch Aktuell: 0.434
          2021-06-10 14:20:00.022  - info: host.ioBroker-zw instance system.adapter.daswetter.0 started with pid 14335
          2021-06-10 14:20:00.550  - info: daswetter.0 (14335) starting. Version 3.0.7 in /opt/iobroker/node_modules/iobroker.daswetter, node: v12.22.1, js-controller: 3.2.16
          2021-06-10 14:20:04.799  - info: daswetter.0 (14335) Terminated (NO_ERROR): Without reason
          2021-06-10 14:20:05.306  - info: daswetter.0 (14335) cleaned everything up...
          2021-06-10 14:20:05.312  - info: host.ioBroker-zw instance system.adapter.daswetter.0 terminated with code 0 (NO_ERROR)
          2021-06-10 14:21:00.010  - info: javascript.0 (9318) script.js.common.PV_Boiler: Boiler ON!
          2021-06-10 14:21:00.010  - info: javascript.0 (9318) script.js.common.PV_Boiler: PV Aktuell: 4.863
          2021-06-10 14:21:00.010  - info: javascript.0 (9318) script.js.common.PV_Boiler: Verbrauch Aktuell: 0.435
          2021-06-10 14:24:00.006  - info: javascript.0 (9318) script.js.common.PV_Boiler: Boiler ON!
          2021-06-10 14:24:00.006  - info: javascript.0 (9318) script.js.common.PV_Boiler: PV Aktuell: 4.867
          2021-06-10 14:24:00.006  - info: javascript.0 (9318) script.js.common.PV_Boiler: Verbrauch Aktuell: 0.447
          2021-06-10 14:27:00.007  - info: javascript.0 (9318) script.js.common.PV_Boiler: Boiler ON!
          2021-06-10 14:27:00.007  - info: javascript.0 (9318) script.js.common.PV_Boiler: PV Aktuell: 4.289
          2021-06-10 14:27:00.007  - info: javascript.0 (9318) script.js.common.PV_Boiler: Verbrauch Aktuell: 0.41
          2021-06-10 14:30:00.009  - info: javascript.0 (9318) script.js.common.PV_Boiler: Boiler ON!
          2021-06-10 14:30:00.009  - info: javascript.0 (9318) script.js.common.PV_Boiler: PV Aktuell: 4.915
          2021-06-10 14:30:00.009  - info: javascript.0 (9318) script.js.common.PV_Boiler: Verbrauch Aktuell: 0.43
          2021-06-10 14:30:00.019  - info: host.ioBroker-zw instance system.adapter.coronavirus-statistics.0 started with pid 14521
          2021-06-10 14:30:00.533  - info: coronavirus-statistics.0 (14521) starting. Version 0.6.3 in /opt/iobroker/node_modules/iobroker.coronavirus-statistics, node: v12.22.1, js-controller: 3.2.16
          2021-06-10 14:30:04.025  - warn: coronavirus-statistics.0 (14521) State attribute definition missing for + undefined
          2021-06-10 14:30:04.967  - info: coronavirus-statistics.0 (14521) Terminated (ADAPTER_REQUESTED_TERMINATION): Without reason
          2021-06-10 14:30:05.497  - info: host.ioBroker-zw instance system.adapter.coronavirus-statistics.0 terminated with code 11 (ADAPTER_REQUESTED_TERMINATION)
          2021-06-10 14:30:43.426  - info: javascript.0 (9318) script.js.common.Astro: neue Tagezeit: Nachmittag
          2021-06-10 14:30:43.426  - info: javascript.0 (9318) script.js.common.Astro: nächte kommende Tagezeit: Abenddämmerung
          2021-06-10 14:33:00.010  - info: javascript.0 (9318) script.js.common.PV_Boiler: Boiler ON!
          2021-06-10 14:33:00.011  - info: javascript.0 (9318) script.js.common.PV_Boiler: PV Aktuell: 4.879
          2021-06-10 14:33:00.011  - info: javascript.0 (9318) script.js.common.PV_Boiler: Verbrauch Aktuell: 0.356
          2021-06-10 14:35:45.979  - debug: node-red.0 (31383) 10 Jun 14:35:45 - [info] Stopping modified nodes
          

          dadurch hast du den log level des adapters hochgedreht.
          die verwendete bibliothek "nodered" hat seinen eigenen log-level,
          den du in dieser settings datei anpassen musst.
          wenn die bibliothek nicht mehr infos liefert kann der adapter auch nicht mehr ausgeben

          die logeinträge haben keine weiteren nodered einträge drin.

          V 1 Reply Last reply Reply Quote 0
          • V
            valbuz @OliverIO last edited by

            @oliverio Die Settings.js habe ich angepasst und NR neu gestartet.
            Sorry aber wo finde ich nun die Einträge? Die Instanz liefert ja nicht mehr und das LOG File in
            /opt/iobroker/log liefert auch nicht mehr.

            Danke nochmals

            OliverIO 1 Reply Last reply Reply Quote 0
            • OliverIO
              OliverIO @valbuz last edited by

              @valbuz said in JS:Out of memory:

              @oliverio Die Settings.js habe ich angepasst und NR neu gestartet.
              Sorry aber wo finde ich nun die Einträge? Die Instanz liefert ja nicht mehr und das LOG File in
              /opt/iobroker/log liefert auch nicht mehr.

              Danke nochmals

              Theoretisch im iobroker log, aber
              da muss dir der adapter entwickler helfen @Bluefox @apollon77

              1 Reply Last reply Reply Quote 0
              • apollon77
                apollon77 last edited by

                Aaaalso:

                ich verstehe richtig das node-red teilweise wegen OOM abkachelt. Da kann ioBroker erstmal weniger dafür.

                Generell sieht das" top" ok aus .. hast 4GB RAM und mehr als die Hälfte ist frei.

                Also wäre ich eher dabei das node-red zu wenig heap hat. Das kannst Du in den Settings von node-red Adapter hoch drehen. Musst mal schauen. Ich glaube Standard sind 256MB oder 512 oder sowas ... setz ,al was höheres.
                Google vllt bei node-red nach best practices

                V 1 Reply Last reply Reply Quote 0
                • V
                  valbuz @apollon77 last edited by

                  @apollon77 sagte in JS:Out of memory:

                  Aaaalso:

                  ich verstehe richtig das node-red teilweise wegen OOM abkachelt. Da kann ioBroker erstmal weniger dafür.

                  Generell sieht das" top" ok aus .. hast 4GB RAM und mehr als die Hälfte ist frei.

                  Also wäre ich eher dabei das node-red zu wenig heap hat. Das kannst Du in den Settings von node-red Adapter hoch drehen. Musst mal schauen. Ich glaube Standard sind 256MB oder 512 oder sowas ... setz ,al was höheres.
                  Google vllt bei node-red nach best practices

                  Standard war bei mir 128 drin. Dies hatte ich vorgängig mal auf 256 gestellt. Problem war immer noch da.
                  Jetzt mal auf 512 geschraubt, schauen wir mal weiter....

                  apollon77 1 Reply Last reply Reply Quote 0
                  • apollon77
                    apollon77 @valbuz last edited by

                    @valbuz am Ende sieht es aber so aus als ob eins deiner genutzten nodes ggf ein Memory leak hat.

                    V 1 Reply Last reply Reply Quote 0
                    • V
                      valbuz @apollon77 last edited by

                      @apollon77 sagte in JS:Out of memory:

                      @valbuz am Ende sieht es aber so aus als ob eins deiner genutzten nodes ggf ein Memory leak hat.

                      Mir fiel auch schon auf, dass beim Update der HUE-Bridge, NR rebootet, weil die Bridge nicht erreichbar ist während dem Update...dürfte doch auch nicht passieren. Die sieht dann eher wieder nach NR oder der HUE Node aus.
                      Doch denke ich die HUE Node wird sicherlich sehr viel verwendet.

                      Dann geht es wohl nur nach Ausschlussverfahren 😠

                      apollon77 1 Reply Last reply Reply Quote 0
                      • apollon77
                        apollon77 @valbuz last edited by

                        @valbuz naja kommt immer darauf an wie sauber das programmiert ist. Schau doch mal die issues der verwendete nodes durch.

                        Oder schau dir die iobroker Adapter an wenn es welche gibt - wie bei hue ;-))

                        V 1 Reply Last reply Reply Quote 0
                        • V
                          valbuz @apollon77 last edited by

                          @apollon77

                          Folgendes...

                          Habe noch ein weiteres, praktisch identisches System, am laufen. Dieses machte bisher keine Probleme.

                          Letzthin habe ich mal wieder Updates gemacht. Also keine Konfig Änderungen.

                          Nachdem ich einige Nodes aktualisiert hatte, war am nachfolgenden Tag plötzlich ein Reboot des Node Red Adapters zusehen mit Vermerk "out of memory".
                          Restore gemacht und seither wieder OK.

                          Taste mich jetzt mal ran....

                          1 Reply Last reply Reply Quote 1
                          • V
                            valbuz last edited by

                            Ich habe nun mal folgendes per Zufall entdeckt. Ob es nun mit dem gesagten Fehler im Zusammenhang ist....

                            Für die Lichtsteuerung habe ich eine HUE-Bridge in NR eingebunden.
                            Das folgende Verhalten ist ebenfalls auf einem 2. System mit ebenfalls einer (anderen) HUE-Bridge nachvollziehbar.

                            Beim Update der HUE-Bridge scheint sich diese kurz vom Netz zu trennen, also kurzzeitig nicht mehr für NR erreichbar zu sein.
                            Dadurch startet das komplette NR neu! Kann bei jedem Update oder trennender Netzverbindung zur Bridge nachvollzogen werden.

                            Hat dies auch schon wer gehabt? Es sind sicherlich einige hier mit NR und HUE.

                            Gruss
                            Pat

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post

                            Support us

                            ioBroker
                            Community Adapters
                            Donate

                            774
                            Online

                            31.8k
                            Users

                            80.0k
                            Topics

                            1.3m
                            Posts

                            4
                            20
                            893
                            Loading More Posts
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes
                            Reply
                            • Reply as topic
                            Log in to reply
                            Community
                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                            The ioBroker Community 2014-2023
                            logo