[configdb] die Datenbank ist zu groß

Begonnen von MarcoR, 26 Februar 2023, 15:19:29

Vorheriges Thema - Nächstes Thema

MarcoR

Hallo zusammen,

ich hab da aktuell ein Problem mit der configdb und weis da irgendwie nicht mehr weiter.
Aktuell ist meine configdb knapp 180MB groß...

configdb info liefert
-----------------------------------------------------------------
configDB Database Information
-----------------------------------------------------------------
d:$Id: configDB.pm 27183 2023-02-05 17:31:57Z betateilchen $
c:$Id: 98_configdb.pm 27183 2023-02-05 17:31:57Z betateilchen $
-----------------------------------------------------------------
dbconn: SQLite:dbname=configDB.db
dbtype: SQLITE
dbsize: 176.16 MB
-----------------------------------------------------------------
loaded:       03aa14b07bbd0a8ef644e875f6574efa
max Versions: 25
lastReorg:    Sun Feb 26 14:48:55 2023
config:       5075 entries

Ver 0 saved: Sun Feb 26 14:48:55 2023 def: 218 attr: 831
Ver 1 saved: Sun Feb 26 14:47:41 2023 def: 218 attr: 831
Ver 2 saved: Sun Feb 26 10:29:04 2023 def: 218 attr: 834
Ver 3 saved: Sun Feb 26 10:27:54 2023 def: 218 attr: 831
-----------------------------------------------------------------
filesave: 38 files stored in database
-----------------------------------------------------------------

configdb filelist liefert

Files found in database:
------------------------------------------------------------
./FHEM/FhemUtils/uniqueID
./FHEM/nrw.holiday
./FHEM/template.layout
./log/eventTypes.txt
./www/gplot/SVG_FL_ESPEasy_Heizung_1.gplot
./www/gplot/SVG_FL_ESPEasy_Heizung_2.gplot
./www/gplot/SVG_FL_ESPEasy_Heizung_3.gplot
./www/gplot/SVG_FL_ESPEasy_Keller_1.gplot
./www/gplot/SVG_FL_ESPEasy_Keller_2.gplot
./www/gplot/SVG_FL_ESPEasy_Keller_3.gplot
./www/gplot/SVG_FL_ESPEasy_TestESP_1.gplot
./www/gplot/SVG_FL_HandyWicoBlau_1.gplot
./www/gplot/SVG_FL_OW_Warm_Rueck_1.gplot
./www/gplot/SVG_FL_OW_Waschkeller_1.gplot
./www/gplot/SVG_FL_SysRochen_1.gplot
./www/gplot/SVG_FL_SysRochen_2.gplot
./www/gplot/SVG_FL_SysRochen_3.gplot
./www/gplot/SVG_FL_SysRochen_4.gplot
./www/gplot/SVG_FL_UNI_BadOG_1.gplot
./www/gplot/SVG_FL_UNI_BadOG_2.gplot
./www/gplot/SVG_FL_UNI_Dach_1.gplot
./www/gplot/SVG_FL_UNI_Dach_2.gplot
./www/gplot/SVG_FL_UNI_Kueche_1.gplot
./www/gplot/SVG_FL_UNI_Kueche_2.gplot
./www/gplot/SVG_FL_UNI_Schuppen_1.gplot
./www/gplot/SVG_FL_UNI_Schuppen_2.gplot
./www/gplot/SVG_FL_haus.stromzaehler_1.gplot
./www/gplot/SVG_FL_haus.stromzaehler_2.gplot
./www/gplot/SVG_FL_haus.stromzaehler_3.gplot
./www/gplot/SVG_FileLog_MQTT2_hoy_dtu_1.gplot
./www/gplot/SVG_FileLog_MQTT2_hoy_dtu_2.gplot
./www/gplot/SVG_FileLog_MQTT2_hoy_dtu_3.gplot
./www/gplot/template.gplot
./www/gplot/templateDB.gplot
03aa14b07bbd0a8ef644e875f6574efa.fhem.save
54f881f60eec95adc8921e0d79d1d7aa.fhem.save
6e45a2b21e8e5f29dcc9dbddcea3a7d5.fhem.save
bed9ae7057ba04896bacf284db42d428.fhem.save

Ein configdb reorg hat bei mir nix gebracht, jede neue gespeicherte Version vergrößert die Datenband ca. um 40 MB.
Schaut man per DB Browser SQlite in die Datenbank, dann findet man, das die fhem.save jeweils ca. 40 MB groß sind.
Und jetzt weis ich nicht mehr weiter ...
Hat wer von euch da noch eine Idee ?

Gruß
Marco

Icinger

Meine Vermutungen:
1) Du hast ein MQTT2_Server laufen und die retains verursachen den großen Speicherbedarf
2) Dein FHEM ist nicht ganz aktuell

Falls ja, dann

set <MQTT2_SERVER> ClearRetain
save

und dann FHEM updaten.

Die DB wird durch ein delete und/oder reorg nicht kleiner, neue Daten vergößern immer die Filesize.
Verkleinern kannst du nur durch VACUUM (siehe https://www.sqlite.org/lang_vacuum.html

lg, Stefan
Verwende deine Zeit nicht mit Erklärungen. Die Menschen hören (lesen) nur, was sie hören (lesen) wollen. (c) Paulo Coelho

MarcoR

Hallo Stefan,

die Version ist aktuell:
Latest Revision: 27269

File                 Rev   Last Change
fhem.pl              27268 2023-02-24 14:53:30Z rudolfkoenig

Aber deine Vermutung, das ich MQTT nutze ist richtig.
Und ja,
set mqtt_Serv clearRetain hat das Problem gelöst.
Danke dafür !
Viele Grüße
Marco