DbRep: delSeqDoublets delete -> Process died prematurely

Begonnen von peter_w, 29 November 2018, 17:34:36

Vorheriges Thema - Nächstes Thema

peter_w

Hallo zusammen,

ich führe um 2:00 nachts "set DbReporting delSeqDoublets delete" aus. Grundsätzlich schien es eine wirkung zu haben, weil der GPLOT der DB Größe immer mal etwas nach unten ging. Weil auf der Grafik lange nichts passiert ist, habe ich mal   "set DbReporting delSeqDoublets delete" von Hand angestossen.
Nach einer Weile gab es die Fehlermeldung und in der LOG Datei schaut es so aus:

2018.11.29 17:08:54.840 5: DbRep DbReporting - Devices for operation - included: % , excluded:
2018.11.29 17:08:54.840 5: DbRep DbReporting - Readings for operation - included: %, excluded:
2018.11.29 17:08:54.841 4: DbRep DbReporting - SQL execute: SELECT DEVICE,READING,TIMESTAMP,VALUE FROM history where TIMESTAMP >= '2018-11-13' AND TIMESTAMP < '2018-11-14' ;
2018.11.29 17:08:56.004 5: DbRep DbReporting - Devices for operation - included: % , excluded:
2018.11.29 17:08:56.004 5: DbRep DbReporting - Readings for operation - included: %, excluded:
2018.11.29 17:08:56.004 4: DbRep DbReporting - SQL execute: SELECT DEVICE,READING,TIMESTAMP,VALUE FROM history where TIMESTAMP >= '2018-11-14' AND TIMESTAMP < '2018-11-15' ;
2018.11.29 17:12:26.463 1: DbRep DbReporting -> BlockingCall delseqdoubl_DoParse pid:DEAD:20743 Process died prematurely


Ich habe eine MYSQL Datenbank am Start:
defmod logdb DbLog ./db.conf .*:(measured-temp|desired-temp|desiredTemperature|ValvePosition|valveposition|temperature|humidity|motion|nomotion|noMotion|pct|energy|kWh|power|closed|open|liter|standardabweichung|varianz|fuellhoehe|state|dew|dewpoint|zaehler|presence|DbFileSize|data_length_MB|DataBaseSize).*
attr logdb DbLogExclude state
attr logdb DbLogType Current/History
attr logdb asyncMode 1
attr logdb colEvent 512
attr logdb colReading 64
attr logdb colValue 128
attr logdb room 40_Server,Database
attr logdb showproctime 1
attr logdb shutdownWait 3

setstate logdb connected
setstate logdb 2018-11-29 17:26:22 CacheUsage 9
setstate logdb 2018-11-29 17:26:05 NextSync 2018-11-29 17:26:35 or if CacheUsage 500 reached
setstate logdb 2018-11-29 17:26:05 background_processing_time 0.2895
setstate logdb 2018-11-29 17:26:05 sql_processing_time 0.2462
setstate logdb 2018-11-29 17:26:05 state connected
setstate logdb 2018-11-07 11:27:07 userCommand SELECT sum(round(((data_length + index_length) / 1024 / 1024), 2)) as '' FROM information_schema.TABLES WHERE table_schema = 'DATENBANK'
setstate logdb 2018-11-07 11:27:07 userCommandResult no result


DbRep schaut so aus:
defmod DbReporting DbRep logdb
attr DbReporting allowDeletion 1
attr DbReporting room 40_Server,Database
attr DbReporting seqDoubletsVariance 0.25
attr DbReporting sqlResultFormat table
attr DbReporting stateFormat { if (defined($defs{$name}{READINGS}{SqlResult})) {\
                                            ReadingsVal($name,"SqlResult",undef);;\
                                        } else {\
                                            ReadingsVal($name,"state",undef);;\
                                        } \
                                      }
attr DbReporting userReadings DataBaseSize:INFO_history.data_index_length_MB.* {ReadingsVal("DbReporting","INFO_history.data_index_length_MB","")/1024}
attr DbReporting verbose 5

setstate DbReporting done
setstate DbReporting 2018-11-29 17:15:46 DataBaseSize 4.22228515625
setstate DbReporting 2018-11-29 17:15:46 INFO_current.avg_row_length 92
setstate DbReporting 2018-11-29 17:15:46 INFO_current.collation utf8_bin
setstate DbReporting 2018-11-29 17:15:46 INFO_current.create_time 2018-11-05 09:45:38
setstate DbReporting 2018-11-29 17:15:46 INFO_current.data_index_length_MB 0.20
setstate DbReporting 2018-11-29 17:15:46 INFO_current.data_length_MB 0.20
setstate DbReporting 2018-11-29 17:15:46 INFO_current.engine InnoDB
setstate DbReporting 2018-11-29 17:15:46 INFO_current.number_of_rows 2313
setstate DbReporting 2018-11-29 17:15:46 INFO_current.row_format Compact
setstate DbReporting 2018-11-29 17:15:46 INFO_current.version 10
setstate DbReporting 2018-11-29 17:15:46 INFO_history.avg_row_length 324
setstate DbReporting 2018-11-29 17:15:46 INFO_history.collation utf8_bin
setstate DbReporting 2018-11-29 17:15:46 INFO_history.create_time 2018-11-05 09:45:39
setstate DbReporting 2018-11-29 17:15:46 INFO_history.data_free_MB 323.00
setstate DbReporting 2018-11-29 17:15:46 INFO_history.data_index_length_MB 4323.62
setstate DbReporting 2018-11-29 17:15:46 INFO_history.data_length_MB 2160.34
setstate DbReporting 2018-11-29 17:15:46 INFO_history.engine InnoDB
setstate DbReporting 2018-11-29 17:15:46 INFO_history.index_length_MB 2163.28
setstate DbReporting 2018-11-29 17:15:46 INFO_history.number_of_rows 6976728
setstate DbReporting 2018-11-29 17:15:46 INFO_history.row_format Compact
setstate DbReporting 2018-11-29 17:15:46 INFO_history.version 10
setstate DbReporting 2018-11-29 17:15:46 state done


Beiträge die mir helfen könnten habe ich hier nicht gefunden.
Hat Jemand eine Idee ?

Danke
   Peter

Release  : 5.8
Raspberry Pi 3
CUL V 1.63 CSM868 HomeMatic (SCC)
HM-CC-RT-DN,HM-LC-Bl1PBU-FM,HM-LC-Sw1PBU-FM,HM-SEC-SCo,HM-WDS10-TH-O

DS_Starter

Hallo Peter,

vermutlich sind zuviele Daten für deinen Speicher auf einmal zu verarbeiten. Beschränke mal die Selektion durch setzen von device und/oder reading.

Ggf. brauchst du dann meherere DbRep die du zu unterschiedlichen Zeiten laufen lässt.

LG,

Heiko
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

peter_w

Hallo Heiko,

danke für den Tip.
Ich habe mir mal ein Device mit einem Reading vorgeknöpft welches in meiner Statistik ganz weit vorne liegt und 1.630.572 Datenpunkte hat und es ist ebenfalls rausgeflogen.

Mit einem anderen Device mit ca. 9500 Datenpunkten hat es funktioniert.

Kann man irgendwie noch den Zeitraum beschränken für den das gemacht wird ? Vielleicht kann mich das retten ?

Danke
   Peter
Release  : 5.8
Raspberry Pi 3
CUL V 1.63 CSM868 HomeMatic (SCC)
HM-CC-RT-DN,HM-LC-Bl1PBU-FM,HM-LC-Sw1PBU-FM,HM-SEC-SCo,HM-WDS10-TH-O

DS_Starter

Ja kannst du. Mit dem attribut aggregation hour. Eine Stunde ist zur zeit die kleinste mögliche einheit.
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

peter_w

Ich meinte eher einen Zeitraum über den ich das machen lasse, also z.B. delSeqDoublets nur über den Zeitraum vom 20.11.2018 - 29.11.2018.

Mein Plan ist:  Erst mal von Hand die Datenflut zu lichten und danach mit täglichem Aufräumen über einen beschränkten Zeitraum zu arbeiten.

Vielleicht kann ich dann ja wieder alle devices reinnehmen.

Gruß
   Peter


Release  : 5.8
Raspberry Pi 3
CUL V 1.63 CSM868 HomeMatic (SCC)
HM-CC-RT-DN,HM-LC-Bl1PBU-FM,HM-LC-Sw1PBU-FM,HM-SEC-SCo,HM-WDS10-TH-O

DS_Starter

Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

peter_w

Hallo Heiko,

ich musste start und Endzeit auf eine Stunde begrenzen weil eine Applikation via MQTT mir pro Stunde 150.000 Einträge in die Datenbank geschoben hat.
Jetzt sind nur noch 40 pro Stunde übrig (was ich mir auch nochmal anschauen muß).
Dein Tip und Tool hat schonmal geholfen.

Gleich lasse ich das nochmal über alle Geräte für die letzten Tage laufen und hoffe damit ist das Thema durch.

Vielen Dank
    Peter
Release  : 5.8
Raspberry Pi 3
CUL V 1.63 CSM868 HomeMatic (SCC)
HM-CC-RT-DN,HM-LC-Bl1PBU-FM,HM-LC-Sw1PBU-FM,HM-SEC-SCo,HM-WDS10-TH-O