Hallo zusammen,
im Zuge des Umzuges meiner SQL von der DS 212j auf eine DS 918+ bin ich dabei mein vorhandenes System erstmal nur Loggingtechnisch auf die neue Diskstation zu spielen.
Kopie der vorhandenen Daten und aktivieren der neuen DB war soweit absolut Problemlos und vollkommen einfach. Allerdings spamt mich seit der Umstellung mein DbLog Device unermüdlich zu:
2020.06.16 19:23:03.356 3: DbLog DBLogging -> Insert into history rejected (possible PK violation) - TS: 2020-06-16 19:22:37, Device: Hauptzaehler, Event: wemos_current_lang: 24.0
2020.06.16 19:23:03.357 3: DbLog DBLogging -> INFO - 6 of 7 events inserted into table history due to PK on columns TIMESTAMP,DEVICE,READING
2020.06.16 19:23:33.175 3: DbLog DBLogging -> Insert into history rejected (possible PK violation) - TS: 2020-06-16 19:23:18, Device: Hauptzaehler, Event: wemos_current_lang: 23.4
2020.06.16 19:23:33.176 3: DbLog DBLogging -> Insert into history rejected (possible PK violation) - TS: 2020-06-16 19:23:22, Device: Hauptzaehler, Event: wemos_current_lang: 23.4
2020.06.16 19:23:33.177 3: DbLog DBLogging -> INFO - 2 of 4 events inserted into table history due to PK on columns TIMESTAMP,DEVICE,READING
2020.06.16 19:24:33.270 3: DbLog DBLogging -> Insert into history rejected (possible PK violation) - TS: 2020-06-16 19:24:04, Device: Hauptzaehler, Event: wemos_current_lang: 23.4
2020.06.16 19:24:33.271 3: DbLog DBLogging -> Insert into history rejected (possible PK violation) - TS: 2020-06-16 19:24:07, Device: Hauptzaehler, Event: wemos_current_lang: 22.7
2020.06.16 19:24:33.272 3: DbLog DBLogging -> INFO - 8 of 10 events inserted into table history due to PK on columns TIMESTAMP,DEVICE,READING
2020.06.16 19:25:03.369 3: DbLog DBLogging -> Insert into history rejected (possible PK violation) - TS: 2020-06-16 19:24:48, Device: Hauptzaehler, Event: wemos_current_lang: 22.7
2020.06.16 19:25:03.370 3: DbLog DBLogging -> Insert into history rejected (possible PK violation) - TS: 2020-06-16 19:24:54, Device: Hauptzaehler, Event: wemos_current_lang: 22.7
2020.06.16 19:25:03.371 3: DbLog DBLogging -> INFO - 6 of 8 events inserted into table history due to PK on columns TIMESTAMP,DEVICE,READING
2020.06.16 19:26:03.317 3: DbLog DBLogging -> Insert into history rejected (possible PK violation) - TS: 2020-06-16 19:25:39, Device: Hauptzaehler, Event: wemos_current_lang: 22.2
2020.06.16 19:26:03.319 3: DbLog DBLogging -> Insert into history rejected (possible PK violation) - TS: 2020-06-16 19:25:42, Device: Hauptzaehler, Event: wemos_current_lang: 22.2
2020.06.16 19:26:03.321 3: DbLog DBLogging -> INFO - 3 of 5 events inserted into table history due to PK on columns TIMESTAMP,DEVICE,READING
2020.06.16 19:26:33.334 3: DbLog DBLogging -> Insert into history rejected (possible PK violation) - TS: 2020-06-16 19:26:28, Device: Hauptzaehler, Event: wemos_current_lang: 21.6
2020.06.16 19:26:33.336 3: DbLog DBLogging -> Insert into history rejected (possible PK violation) - TS: 2020-06-16 19:26:31, Device: Hauptzaehler, Event: wemos_current_lang: 21.6
2020.06.16 19:26:33.338 3: DbLog DBLogging -> INFO - 3 of 5 events inserted into table history due to PK on columns TIMESTAMP,DEVICE,READING
Selbst die Suche in den alten Beiträgen der Fehlermeldung, hat mich nicht in die richtige Richtung geschubst.... Kann mir da jemand weiterhelfen wie ich das vermeiden kann?
Hab mal n paar Minuten verbose 5 laufen lassen. Mit dem entsprechendem Device "Hauptzaehler" sehen die Ergebnisse so aus:
2020.06.16 19:20:32.832 4: DbLog DBLogging -> ################################################################
2020.06.16 19:20:32.832 4: DbLog DBLogging -> ### New database processing cycle - asynchronous ###
2020.06.16 19:20:32.832 4: DbLog DBLogging -> ################################################################
2020.06.16 19:20:32.833 4: DbLog DBLogging -> MemCache contains 7 entries to process
2020.06.16 19:20:32.833 4: DbLog DBLogging -> DbLogType is: Current/History
2020.06.16 19:20:32.833 5: DbLog DBLogging -> MemCache contains: 2020-06-16 19:20:08|Nebenzaehler|ELECTRICITYCALCULATOR|wemoszaehler_KG_current_5min: 9.9|wemoszaehler_KG_current_5min|9.9|
2020.06.16 19:20:32.833 5: DbLog DBLogging -> MemCache contains: 2020-06-16 19:20:08|Nebenzaehler|ELECTRICITYCALCULATOR|wemoszaehler_KG_current_30min: 9.4|wemoszaehler_KG_current_30min|9.4|
2020.06.16 19:20:32.833 5: DbLog DBLogging -> MemCache contains: 2020-06-16 19:20:13|OG_SZ_SD_02Bett_LI|MQTT2_DEVICE|DS18B20_Temperature_korr: 28.9|DS18B20_Temperature_korr|28.9|
2020.06.16 19:20:32.834 5: DbLog DBLogging -> MemCache contains: 2020-06-16 19:20:27|Hauptzaehler|ELECTRICITYCALCULATOR|wemos_current_lang: 34.6|wemos_current_lang|34.6|
2020.06.16 19:20:32.834 5: DbLog DBLogging -> MemCache contains: 2020-06-16 19:20:28|Hauptzaehler|ELECTRICITYCALCULATOR|wemos_current_lang: 33.2|wemos_current_lang|33.2|
2020.06.16 19:20:32.834 5: DbLog DBLogging -> MemCache contains: 2020-06-16 19:20:30|Hauptzaehler|ELECTRICITYCALCULATOR|wemos_current_lang: 33.2|wemos_current_lang|33.2|
2020.06.16 19:20:32.834 5: DbLog DBLogging -> MemCache contains: 2020-06-16 19:20:30|Hauptzaehler|ELECTRICITYCALCULATOR|wemos_current_lang: 33.2|wemos_current_lang|33.2|
2020.06.16 19:20:32.848 5: DbLog DBLogging -> DbLog_PushAsync called with timeout: 86400
2020.06.16 19:20:32.871 5: DbLog DBLogging -> Start DbLog_PushAsync
2020.06.16 19:20:32.871 5: DbLog DBLogging -> DbLogType is: Current/History
2020.06.16 19:20:32.876 4: DbLog DBLogging -> AutoCommit mode: ON, Transaction mode: ON
2020.06.16 19:20:32.877 4: DbLog DBLogging -> Insert mode: Array
2020.06.16 19:20:32.906 4: DbLog DBLogging -> Primary Key used in history: TIMESTAMP,DEVICE,READING
2020.06.16 19:20:32.907 4: DbLog DBLogging -> Primary Key used in current: none
2020.06.16 19:20:32.907 5: DbLog DBLogging -> processing event Timestamp: 2020-06-16 19:20:08, Device: Nebenzaehler, Type: ELECTRICITYCALCULATOR, Event: wemoszaehler_KG_current_5min: 9.9, Reading: wemoszaehler_KG_current_5min, Value: 9.9, Unit:
2020.06.16 19:20:32.908 5: DbLog DBLogging -> processing event Timestamp: 2020-06-16 19:20:08, Device: Nebenzaehler, Type: ELECTRICITYCALCULATOR, Event: wemoszaehler_KG_current_30min: 9.4, Reading: wemoszaehler_KG_current_30min, Value: 9.4, Unit:
2020.06.16 19:20:32.908 5: DbLog DBLogging -> processing event Timestamp: 2020-06-16 19:20:13, Device: OG_SZ_SD_02Bett_LI, Type: MQTT2_DEVICE, Event: DS18B20_Temperature_korr: 28.9, Reading: DS18B20_Temperature_korr, Value: 28.9, Unit:
2020.06.16 19:20:32.908 5: DbLog DBLogging -> processing event Timestamp: 2020-06-16 19:20:27, Device: Hauptzaehler, Type: ELECTRICITYCALCULATOR, Event: wemos_current_lang: 34.6, Reading: wemos_current_lang, Value: 34.6, Unit:
2020.06.16 19:20:32.908 5: DbLog DBLogging -> processing event Timestamp: 2020-06-16 19:20:28, Device: Hauptzaehler, Type: ELECTRICITYCALCULATOR, Event: wemos_current_lang: 33.2, Reading: wemos_current_lang, Value: 33.2, Unit:
2020.06.16 19:20:32.909 5: DbLog DBLogging -> processing event Timestamp: 2020-06-16 19:20:30, Device: Hauptzaehler, Type: ELECTRICITYCALCULATOR, Event: wemos_current_lang: 33.2, Reading: wemos_current_lang, Value: 33.2, Unit:
2020.06.16 19:20:32.909 5: DbLog DBLogging -> processing event Timestamp: 2020-06-16 19:20:30, Device: Hauptzaehler, Type: ELECTRICITYCALCULATOR, Event: wemos_current_lang: 33.2, Reading: wemos_current_lang, Value: 33.2, Unit:
2020.06.16 19:20:32.916 3: DbLog DBLogging -> Insert into history rejected (possible PK violation) - TS: 2020-06-16 19:20:30, Device: Hauptzaehler, Event: wemos_current_lang: 33.2
2020.06.16 19:20:32.916 3: DbLog DBLogging -> INFO - 6 of 7 events inserted into table history due to PK on columns TIMESTAMP,DEVICE,READING
2020.06.16 19:20:33.006 4: DbLog DBLogging -> insert table history committed by autocommit
2020.06.16 19:20:33.014 4: DbLog DBLogging -> 7 of 7 events updated in table current
2020.06.16 19:20:33.194 4: DbLog DBLogging -> insert / update table current committed by autocommit
oder
2020.06.16 19:20:02.812 4: DbLog DBLogging -> ################################################################
2020.06.16 19:20:02.812 4: DbLog DBLogging -> ### New database processing cycle - asynchronous ###
2020.06.16 19:20:02.812 4: DbLog DBLogging -> ################################################################
2020.06.16 19:20:02.813 4: DbLog DBLogging -> MemCache contains 9 entries to process
2020.06.16 19:20:02.813 4: DbLog DBLogging -> DbLogType is: Current/History
2020.06.16 19:20:02.813 5: DbLog DBLogging -> MemCache contains: 2020-06-16 19:19:44|Hauptzaehler|ELECTRICITYCALCULATOR|wemos_current_lang: 34.6|wemos_current_lang|34.6|
2020.06.16 19:20:02.813 5: DbLog DBLogging -> MemCache contains: 2020-06-16 19:19:44|Hauptzaehler|ELECTRICITYCALCULATOR|wemos_kwh_current: 20.1|wemos_kwh_current|20.1|
2020.06.16 19:20:02.813 5: DbLog DBLogging -> MemCache contains: 2020-06-16 19:19:44|Hauptzaehler|ELECTRICITYCALCULATOR|wemos_current_lang: 34.6|wemos_current_lang|34.6|
2020.06.16 19:20:02.814 5: DbLog DBLogging -> MemCache contains: 2020-06-16 19:19:48|Hauptzaehler|ELECTRICITYCALCULATOR|wemos_current_lang: 34.6|wemos_current_lang|34.6|
2020.06.16 19:20:02.814 5: DbLog DBLogging -> MemCache contains: 2020-06-16 19:19:48|Hauptzaehler|ELECTRICITYCALCULATOR|wemos_current_lang: 34.6|wemos_current_lang|34.6|
2020.06.16 19:20:02.814 5: DbLog DBLogging -> MemCache contains: 2020-06-16 19:19:53|Wetterstation|HP1000|luminosity: 10225.3|luminosity|10225|lx
2020.06.16 19:20:02.814 5: DbLog DBLogging -> MemCache contains: 2020-06-16 19:19:53|Nebenzaehler|ELECTRICITYCALCULATOR|wemoszaehler_EG_current_5min: 2.7|wemoszaehler_EG_current_5min|2.7|
2020.06.16 19:20:02.814 5: DbLog DBLogging -> MemCache contains: 2020-06-16 19:19:53|Nebenzaehler|ELECTRICITYCALCULATOR|wemoszaehler_EG_current_30min: 1.8|wemoszaehler_EG_current_30min|1.8|
2020.06.16 19:20:02.815 5: DbLog DBLogging -> MemCache contains: 2020-06-16 19:19:53|EG_KUE_HM_kuehl_back_Pwr|CUL_HM|power: 126|power|126|
2020.06.16 19:20:02.828 5: DbLog DBLogging -> DbLog_PushAsync called with timeout: 86400
2020.06.16 19:20:02.851 5: DbLog DBLogging -> Start DbLog_PushAsync
2020.06.16 19:20:02.851 5: DbLog DBLogging -> DbLogType is: Current/History
2020.06.16 19:20:02.856 4: DbLog DBLogging -> AutoCommit mode: ON, Transaction mode: ON
2020.06.16 19:20:02.857 4: DbLog DBLogging -> Insert mode: Array
2020.06.16 19:20:02.886 4: DbLog DBLogging -> Primary Key used in history: TIMESTAMP,DEVICE,READING
2020.06.16 19:20:02.887 4: DbLog DBLogging -> Primary Key used in current: none
2020.06.16 19:20:02.887 5: DbLog DBLogging -> processing event Timestamp: 2020-06-16 19:19:44, Device: Hauptzaehler, Type: ELECTRICITYCALCULATOR, Event: wemos_current_lang: 34.6, Reading: wemos_current_lang, Value: 34.6, Unit:
2020.06.16 19:20:02.888 5: DbLog DBLogging -> processing event Timestamp: 2020-06-16 19:19:44, Device: Hauptzaehler, Type: ELECTRICITYCALCULATOR, Event: wemos_kwh_current: 20.1, Reading: wemos_kwh_current, Value: 20.1, Unit:
2020.06.16 19:20:02.888 5: DbLog DBLogging -> processing event Timestamp: 2020-06-16 19:19:44, Device: Hauptzaehler, Type: ELECTRICITYCALCULATOR, Event: wemos_current_lang: 34.6, Reading: wemos_current_lang, Value: 34.6, Unit:
2020.06.16 19:20:02.888 5: DbLog DBLogging -> processing event Timestamp: 2020-06-16 19:19:48, Device: Hauptzaehler, Type: ELECTRICITYCALCULATOR, Event: wemos_current_lang: 34.6, Reading: wemos_current_lang, Value: 34.6, Unit:
2020.06.16 19:20:02.888 5: DbLog DBLogging -> processing event Timestamp: 2020-06-16 19:19:48, Device: Hauptzaehler, Type: ELECTRICITYCALCULATOR, Event: wemos_current_lang: 34.6, Reading: wemos_current_lang, Value: 34.6, Unit:
2020.06.16 19:20:02.889 5: DbLog DBLogging -> processing event Timestamp: 2020-06-16 19:19:53, Device: Wetterstation, Type: HP1000, Event: luminosity: 10225.3, Reading: luminosity, Value: 10225, Unit: lx
2020.06.16 19:20:02.889 5: DbLog DBLogging -> processing event Timestamp: 2020-06-16 19:19:53, Device: Nebenzaehler, Type: ELECTRICITYCALCULATOR, Event: wemoszaehler_EG_current_5min: 2.7, Reading: wemoszaehler_EG_current_5min, Value: 2.7, Unit:
2020.06.16 19:20:02.889 5: DbLog DBLogging -> processing event Timestamp: 2020-06-16 19:19:53, Device: Nebenzaehler, Type: ELECTRICITYCALCULATOR, Event: wemoszaehler_EG_current_30min: 1.8, Reading: wemoszaehler_EG_current_30min, Value: 1.8, Unit:
2020.06.16 19:20:02.890 5: DbLog DBLogging -> processing event Timestamp: 2020-06-16 19:19:53, Device: EG_KUE_HM_kuehl_back_Pwr, Type: CUL_HM, Event: power: 126, Reading: power, Value: 126, Unit:
2020.06.16 19:20:02.898 3: DbLog DBLogging -> Insert into history rejected (possible PK violation) - TS: 2020-06-16 19:19:44, Device: Hauptzaehler, Event: wemos_current_lang: 34.6
2020.06.16 19:20:02.898 3: DbLog DBLogging -> Insert into history rejected (possible PK violation) - TS: 2020-06-16 19:19:48, Device: Hauptzaehler, Event: wemos_current_lang: 34.6
2020.06.16 19:20:02.898 3: DbLog DBLogging -> INFO - 7 of 9 events inserted into table history due to PK on columns TIMESTAMP,DEVICE,READING
2020.06.16 19:20:03.050 4: DbLog DBLogging -> insert table history committed by autocommit
2020.06.16 19:20:03.058 4: DbLog DBLogging -> 9 of 9 events updated in table current
DbLog Device: (Hab verbse2 hinzugefügt, damit der Spam aufhört)
Internals:
.FhemMetaInternals 1
COLUMNS field length used for Device: 64, Type: 64, Event: 512, Reading: 64, Value: 128, Unit: 32
CONFIGURATION ./monnestfhemdblive.conf
DEF ./monnestfhemdblive.conf .*:.*
FUUID 5cd15d7f-f33f-8d79-3061-61ff0ff05a20c7f1
FVERSION 93_DbLog.pm:v4.10.0-s22018/2020-05-24
MODE asynchronous
MODEL MYSQL
NAME DBLogging
NR 112
NTFY_ORDER 50-DBLogging
PID 2953
REGEXP .*:.*
STATE connected
TYPE DbLog
UTF8 1
dbconn mysql:database=fhem_DB_LIVE;host=192.168.0.20;port=1851
dbuser fhempi_user
.attraggr:
.attrminint:
HELPER:
COLSET 1
DEVICECOL 64
EVENTCOL 512
OLDSTATE connected
PACKAGE main
READINGCOL 64
TC current
TH history
TYPECOL 64
UNITCOL 32
VALUECOL 128
VERSION 4.10.0
READINGS:
2020-06-16 19:36:37 CacheUsage 2
2020-06-16 19:36:34 NextSync 2020-06-16 19:37:04 or if CacheUsage 500 reached
2020-01-28 15:02:26 countCurrent 221
2020-01-28 15:02:26 countHistory 202279
2020-01-28 15:06:35 reduceLogState reduceLogNbl finished. Rows processed: 103011, deleted: 65925, updated: 7048, time: 219.00sec
2020-06-16 19:36:34 state connected
Attributes:
DbLogExclude .*
DbLogSelectionMode Exclude/Include
DbLogType Current/History
asyncMode 1
group FileLog
icon own-log
room System->Datenbank
suppressAddLogV3 1
verbose 2
Vielen Dank im Voraus
Viele Grüße
Andreas
Hallo Andreas,
das ist kein Fehler sondern die Meldung wenn der PK arbeitet. Dadurch sieht man es.
Verbose 2 ist genau richtig.
Alles gut. :)
Grüße,
Heiko
Hey Heiko,
menno da spam ich dermaßen das Forum voll und dann kommt:
Zitat von: DS_Starter am 16 Juni 2020, 19:48:32
Alles gut. :)
als Antwort ;D ... Vielen herzlichen Dank für Deine schnelle Antwort :)
Wenn mit verbose2 alles richtig und gut ist, muss ich mich doch mal sehr wundern, warum das Logdevice diese Meldung vorher nicht gebracht hat ? *grübel*
Ich habe lediglich die db.conf geändert, damit er eine andere DB-Anbindung nimmt. restliche Einstellungen sind alle geblieben
Viele Grüße
Andreas
Die Meldung kommt nur wenn du einen PK in der DB definiert hast (ist ja nicht Standard) UND der arbeitet, d.h. Events zu doppelten Einträgen führen würden. An der Stelle könntest du ansetzen. Diese Events sieht man in deinen Beispielen sehr gut.
Zitat von: DS_Starter am 16 Juni 2020, 20:05:23
Diese Events sieht man in deinen Beispielen sehr gut.
Danke Dir .. ich schau dann mal wie ich die Anzahl der Events dann doch vielleicht ein wenig verringern kann :)
VG
Andreas