NEWS
Test Adapter History 2.0.0
-
@homoran sagte in Test Adapter History 2.0.0:
Muss man da noch einen Zauberspruch aufsagen, oder klappt das einfach nur nicht?
Was meinst du? Du musst da auch "löschen" klicken ... dann wird es gelöscht ... oder check die Checkbox dann fragt er ne weile nicht mehr nach
-
@apollon77 sagte in Test Adapter History 2.0.0:
Du musst da auch "löschen" klicken ... dann wird es gelöscht
eben nicht
-
@homoran debug log vom Adapter mal an und bitte log von so nem löschen zeigen. Dran hab ich nix geändert. Muss man schauen
-
@apollon77 Hab ich (oder du) ein Problem.
Das debug müllt das log zu.
ich erkenne nicht was zum löschen gehörtWie lange dauert das Ganze?
fängt an mit:
2022-04-27 14:53:18.765 - debug: history.0 (4085778) Redis Objects: Use Redis connection: 0.0.0.0:9001 2022-04-27 14:53:18.794 - debug: history.0 (4085778) Objects client ready ... initialize now 2022-04-27 14:53:18.799 - debug: history.0 (4085778) Objects create System PubSub Client 2022-04-27 14:53:18.800 - debug: history.0 (4085778) Objects create User PubSub Client 2022-04-27 14:53:18.801 - debug: history.0 (4085778) Objects client initialize lua scripts 2022-04-27 14:53:18.816 - debug: history.0 (4085778) Objects connected to redis: 0.0.0.0:9001 2022-04-27 14:53:18.822 - debug: history.0 (4085778) objectDB connected 2022-04-27 14:53:18.823 - debug: history.0 (4085778) Redis States: Use Redis connection: 0.0.0.0:9000 2022-04-27 14:53:18.832 - debug: history.0 (4085778) States create System PubSub Client 2022-04-27 14:53:18.833 - debug: history.0 (4085778) States create User PubSub Client 2022-04-27 14:53:18.844 - debug: history.0 (4085778) States connected to redis: 0.0.0.0:9000 2022-04-27 14:53:18.845 - debug: history.0 (4085778) statesDB connected 2022-04-27 14:53:19.057 - debug: history.0 (4085778) Plugin sentry Initialize Plugin (enabled=true)
Hab's nochmal versucht und finde:
2022-04-27 14:59:41.657 - debug: history.0 (4085778) sendTo "getHistory" to system.adapter.web.0 from system.adapter.history.0 2022-04-27 14:59:50.596 - debug: history.0 (4085778) deleteState 1 items 2022-04-27 14:59:50.597 - warn: history.0 (4085778) States system pmessage io.messagebox.system.adapter.history.0 {"command":"delete","message":[{"state":{"ts":1651063995440},"id":"Messwerte.0.Stromzaehler.Summenwerte.Tagesendverbrauch"}],"from":"system.adapter.admin.0","callback":{"message":[{"state":{"ts":1651063995440},"id":"Messwerte.0.Stromzaehler.Summenwerte.Tagesendverbrauch"}],"id":325,"ack":false,"time":1651064390595},"_id":70540713} file is not defined 2022-04-27 14:59:50.604 - warn: history.0 (4085778) ReferenceError: file is not defined at /opt/iobroker/node_modules/iobroker.history/main.js:1552:59 at Array.forEach () at _delete (/opt/iobroker/node_modules/iobroker.history/main.js:1505:15) at deleteState (/opt/iobroker/node_modules/iobroker.history/main.js:1628:17) at processMessage (/opt/iobroker/node_modules/iobroker.history/main.js:326:9) at Object.message (/opt/iobroker/node_modules/iobroker.history/main.js:233:25) at change (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5634:41) at Immediate._onImmediate (/opt/iobroker/node_modules/@iobroker/db-states-redis/lib/states/statesInRedisClient.js:232:37) at processImmediate (internal/timers.js:464:21)
-
@homoran COngrats, you forund a bug :-)) Fixed ion GitHub
-
@apollon77 Aber immer wieder gerne
EDIT:
Works like a charm!
Endlich kann ich meine Charts aufräumen.
Sind natürlich jetzt unendlich viele DPs mit Dp*8 null drin -
@homoran Viel Erfolg
-
@apollon77 sagte in Test Adapter History 2.0.0:
@homoran COngrats, you forund a bug :-)) Fixed ion GitHub
ich versuche es gleich nochmal
Ich habe gerade festgestellt, dass in einem Chart eine Linie fehlte.
Beim Versuch die Daten des zuständigen Datenpunktes anzusehen scheint history abgestürzt zu sein:2022-04-28 14:41:30.041 - error: host.iobroker-VM03 Caught by controller[0]: <--- Last few GCs ---> 2022-04-28 14:41:30.043 - error: host.iobroker-VM03 Caught by controller[0]: [2034430:0x597ac00] 38402 ms: Mark-sweep 1862.1 (1987.9) -> 1858.1 (1990.6) MB, 1777.6 / 0.0 ms (average mu = 0.225, current mu = 0.029) allocation failure scavenge might not succeed 2022-04-28 14:41:30.043 - error: host.iobroker-VM03 Caught by controller[0]: [2034430:0x597ac00] 40186 ms: Mark-sweep 1874.1 (1990.6) -> 1870.1 (1993.1) MB, 1712.1 / 0.0 ms (average mu = 0.147, current mu = 0.040) allocation failure scavenge might not succeed 2022-04-28 14:41:30.043 - error: host.iobroker-VM03 Caught by controller[0]: <--- JS stacktrace ---> 2022-04-28 14:41:30.043 - error: host.iobroker-VM03 Caught by controller[0]: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 2022-04-28 14:41:30.043 - error: host.iobroker-VM03 Caught by controller[1]: 1: 0xa3aaf0 node::Abort() [io.history.0] 2022-04-28 14:41:30.043 - error: host.iobroker-VM03 Caught by controller[2]: 2: 0x970199 node::FatalError(char const*, char const*) [io.history.0] 2022-04-28 14:41:30.044 - error: host.iobroker-VM03 Caught by controller[3]: 3: 0xbba45e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [io.history.0] 2022-04-28 14:41:30.044 - error: host.iobroker-VM03 Caught by controller[4]: 4: 0xbba7d7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [io.history.0] 2022-04-28 14:41:30.044 - error: host.iobroker-VM03 Caught by controller[5]: 5: 0xd769e5 [io.history.0] 2022-04-28 14:41:30.044 - error: host.iobroker-VM03 Caught by controller[6]: 6: 0xd7756f [io.history.0] 2022-04-28 14:41:30.044 - error: host.iobroker-VM03 Caught by controller[7]: 7: 0xd853ab v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [io.history.0] 2022-04-28 14:41:30.044 - error: host.iobroker-VM03 Caught by controller[8]: 8: 0xd88f6c v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [io.history.0] 2022-04-28 14:41:30.044 - error: host.iobroker-VM03 Caught by controller[9]: 9: 0xd4e73d v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [io.history.0] 2022-04-28 14:41:30.044 - error: host.iobroker-VM03 Caught by controller[10]: 10: 0xd4a999 v8::internal::FactoryBase::AllocateRawArray(int, v8::internal::AllocationType) [io.history.0] 2022-04-28 14:41:30.044 - error: host.iobroker-VM03 Caught by controller[11]: 11: 0xd4aa54 v8::internal::FactoryBase::NewFixedArrayWithFiller(v8::internal::Handle, int, v8::internal::Handle, v8::internal::AllocationType) [io.history.0] 2022-04-28 14:41:30.044 - error: host.iobroker-VM03 Caught by controller[12]: 12: 0xf80ffe v8::internal::Handle v8::internal::HashTable::New(v8::internal::Isolate*, int, v8::internal::AllocationType, v8::internal::MinimumCapacity) [io.history.0] 2022-04-28 14:41:30.044 - error: host.iobroker-VM03 Caught by controller[13]: 13: 0xf81cf9 v8::internal::Handle v8::internal::BaseNameDictionary::New(v8::internal::Isolate*, int, v8::internal::AllocationType, v8::internal::MinimumCapacity) [io.history.0] 2022-04-28 14:41:30.044 - error: host.iobroker-VM03 Caught by controller[14]: 14: 0xf35be1 v8::internal::JSObject::MigrateToMap(v8::internal::Isolate*, v8::internal::Handle, v8::internal::Handle, int) [io.history.0] 2022-04-28 14:41:30.044 - error: host.iobroker-VM03 Caught by controller[15]: 15: 0xf556cc v8::internal::LookupIterator::Delete() [io.history.0] 2022-04-28 14:41:30.044 - error: host.iobroker-VM03 Caught by controller[16]: 16: 0xf2c55b v8::internal::JSReceiver::DeleteProperty(v8::internal::LookupIterator*, v8::internal::LanguageMode) [io.history.0] 2022-04-28 14:41:30.044 - error: host.iobroker-VM03 Caught by controller[17]: 17: 0x10b4600 v8::internal::Runtime::DeleteObjectProperty(v8::internal::Isolate*, v8::internal::Handle, v8::internal::Handle, v8::internal::LanguageMode) [io.history.0] 2022-04-28 14:41:30.045 - error: host.iobroker-VM03 Caught by controller[18]: 18: 0x10b673a v8::internal::Runtime_DeleteProperty(int, unsigned long*, v8::internal::Isolate*) [io.history.0] 2022-04-28 14:41:30.045 - error: host.iobroker-VM03 Caught by controller[19]: 19: 0x1448e19 [io.history.0] 2022-04-28 14:41:30.045 - warn: host.iobroker-VM03 instance system.adapter.history.0 terminated due to SIGABRT
EDIT:
Habe bei dem Datenpunkt Logging deaktiviert und neu konfiguriert.
Seitdem loggt er anscheinend wieder, aber sobald ich mir die Werte ansehen will stürzt history ab -
@homoran Wie lange zurück schaust Du denn? Das ist ein "Out of memory" ... Ansonsten Debug wieder an und dann mal log von so einem crash senden
-
@apollon77 sagte in Test Adapter History 2.0.0:
Das ist ein "Out of memory"
Hatte ich gesehen
habe 4GB RAM zugewiesen und etwa 0,5GB free und 1,5 - 2 GB available@apollon77 sagte in Test Adapter History 2.0.0:
Wie lange zurück schaust Du denn?
erst drei Tage, dann nur noch 10 Minuten.
Allerdings loggt er (???) alle 6 Sekundenscheint in Zeile 119 loszugehen
-
@homoran siehst du wieviele getHistpry abfragen da quasi parallel kommen ?! Wow. Ixh schaue mal.
-
@homoran Ich hab mal versucht was zu optimieren, aber das ist schwierig. versuch mal GitHub version. Sonst setzen wir einfach den Heap für deinen Prozess hoch
-
Auf GitHub sind einige Fixes hinzugekommen und auch noch zwei neue Features:
- Bei storeState kann nun mittels dem Parameter "rule=true" festlegen das die Daten nicht direkt geloggt werden sondern alle Rules angewendet werden wie für jeden normalen Wert - inkl. Debounce u.ä. Bitte vorsichtig nutzen das nicht unabsichtlich Werte nicht geschrieben werden!
- Eine Einstellung pro Datenpunkt ist dazugekommen, mit der man angeben kann auf wie viele Stellen nach dem Komma die Werte beim lesen (GetHistory) gerundet werden.
-
@apollon77 ich bekomme nicht mal einen sinnvollen debug-log zustande
2022-05-01 14:31:34.235 - info: host.iobroker-VM03 stopInstance system.adapter.history.0 (force=false, process=true) 2022-05-01 14:31:38.374 - error: host.iobroker-VM03 Caught by controller[0]: <--- Last few GCs ---> 2022-05-01 14:31:38.374 - error: host.iobroker-VM03 Caught by controller[0]: [4074178:0x543dc00] 60961 ms: Mark-sweep 1870.8 (1993.1) -> 1866.8 (1995.6) MB, 1798.0 / 0.0 ms (average mu = 0.216, current mu = 0.040) allocation failure scavenge might not succeed 2022-05-01 14:31:38.374 - error: host.iobroker-VM03 Caught by controller[0]: [4074178:0x543dc00] 62792 ms: Mark-sweep 1882.7 (1995.6) -> 1878.8 (1998.4) MB, 1761.4 / 0.0 ms (average mu = 0.139, current mu = 0.038) allocation failure scavenge might not succeed 2022-05-01 14:31:38.375 - error: host.iobroker-VM03 Caught by controller[0]: <--- JS stacktrace ---> 2022-05-01 14:31:38.375 - error: host.iobroker-VM03 Caught by controller[0]: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 2022-05-01 14:31:38.375 - error: host.iobroker-VM03 Caught by controller[1]: 1: 0xa3aaf0 node::Abort() [io.history.0] 2022-05-01 14:31:38.375 - error: host.iobroker-VM03 Caught by controller[2]: 2: 0x970199 node::FatalError(char const*, char const*) [io.history.0] 2022-05-01 14:31:38.375 - error: host.iobroker-VM03 Caught by controller[3]: 3: 0xbba45e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [io.history.0] 2022-05-01 14:31:38.375 - error: host.iobroker-VM03 Caught by controller[4]: 4: 0xbba7d7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [io.history.0] 2022-05-01 14:31:38.375 - error: host.iobroker-VM03 Caught by controller[5]: 5: 0xd769e5 [io.history.0] 2022-05-01 14:31:38.375 - error: host.iobroker-VM03 Caught by controller[6]: 6: 0xd7756f [io.history.0] 2022-05-01 14:31:38.375 - error: host.iobroker-VM03 Caught by controller[7]: 7: 0xd853ab v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [io.history.0] 2022-05-01 14:31:38.375 - error: host.iobroker-VM03 Caught by controller[8]: 8: 0xd88f6c v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [io.history.0] 2022-05-01 14:31:38.376 - error: host.iobroker-VM03 Caught by controller[9]: 9: 0xd4e73d v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [io.history.0] 2022-05-01 14:31:38.376 - error: host.iobroker-VM03 Caught by controller[10]: 10: 0xd4a999 v8::internal::FactoryBase::AllocateRawArray(int, v8::internal::AllocationType) [io.history.0] 2022-05-01 14:31:38.376 - error: host.iobroker-VM03 Caught by controller[11]: 11: 0xd4aa54 v8::internal::FactoryBase::NewFixedArrayWithFiller(v8::internal::Handle, int, v8::internal::Handle, v8::internal::AllocationType) [io.history.0] 2022-05-01 14:31:38.376 - error: host.iobroker-VM03 Caught by controller[12]: 12: 0xf80ffe v8::internal::Handle v8::internal::HashTable::New(v8::internal::Isolate*, int, v8::internal::AllocationType, v8::internal::MinimumCapacity) [io.history.0] 2022-05-01 14:31:38.376 - error: host.iobroker-VM03 Caught by controller[13]: 13: 0xf81cf9 v8::internal::Handle v8::internal::BaseNameDictionary::New(v8::internal::Isolate*, int, v8::internal::AllocationType, v8::internal::MinimumCapacity) [io.history.0] 2022-05-01 14:31:38.376 - error: host.iobroker-VM03 Caught by controller[14]: 14: 0xf35be1 v8::internal::JSObject::MigrateToMap(v8::internal::Isolate*, v8::internal::Handle, v8::internal::Handle, int) [io.history.0] 2022-05-01 14:31:38.376 - error: host.iobroker-VM03 Caught by controller[15]: 15: 0xf556cc v8::internal::LookupIterator::Delete() [io.history.0] 2022-05-01 14:31:38.376 - error: host.iobroker-VM03 Caught by controller[16]: 16: 0xf2c55b v8::internal::JSReceiver::DeleteProperty(v8::internal::LookupIterator*, v8::internal::LanguageMode) [io.history.0] 2022-05-01 14:31:38.376 - error: host.iobroker-VM03 Caught by controller[17]: 17: 0x10b4600 v8::internal::Runtime::DeleteObjectProperty(v8::internal::Isolate*, v8::internal::Handle, v8::internal::Handle, v8::internal::LanguageMode) [io.history.0] 2022-05-01 14:31:38.376 - error: host.iobroker-VM03 Caught by controller[18]: 18: 0x10b673a v8::internal::Runtime_DeleteProperty(int, unsigned long*, v8::internal::Isolate*) [io.history.0] 2022-05-01 14:31:38.376 - error: host.iobroker-VM03 Caught by controller[19]: 19: 0x1448e19 [io.history.0] 2022-05-01 14:31:38.376 - warn: host.iobroker-VM03 instance system.adapter.history.0 terminated due to SIGABRT 2022-05-01 14:31:38.376 - info: host.iobroker-VM03 instance system.adapter.history.0 terminated with code NaN ()
Habe dann immer relativ schnell den debug wieder abschalten wollen um das log nicht zu groß werden zu lassen, aber anscheinend kommt nach dem Absturz erst wieder dei Meldungen vom Neustart und dann..
wobei ich da auf die Schnelle nichts finde was zu dem DP gehört, den ich öffnen will:
Messwerte.0.Solaranlage.Momentanwerte.Eigenverbrauch
übrigens bei allen DPs, die im 6Sekunden-Takt loggen gleiches Problem.
@apollon77 sagte in Test Adapter History 2.0.0:
Auf GitHub sind einige Fixes hinzugekommen und auch noch zwei neue Features:
aber immer noch 2.0.0??
-
@homoran wo kommen denn diese massiv vielen gehHistory calls her? Das sind ja mehrere pro Sekunde???
Vor allem
Für den gleichen Datenpunkt. Weil am Ende ist’s sehr einfach: jeder der calls lädt mindestens die Daten des gesamten Tages und dann werden die auf die relevante Zeit gekürzt quasi. Ich schaue nochmal ob man das optimieren kannUnd ja. GitHub weiter auf 2.0.0
-
@apollon77 sagte in Test Adapter History 2.0.0:
wo kommen denn diese massiv vielen gehHistory calls her? Das sind ja mehrere pro Sekunde???
Vor allem
Für den gleichen Datenpunkt.Ich denke, das liegt daran, dass ich gerade die History des Datenpunktes aufrufe
(Hoffentlich) -
@homoran dann wäre es aber schon ein Admin Bug das er soooooo oft fragt. Muss ich nochmal genau schauen.
-
-
@homoran Update mal?
-