Zll.db is over 800meg. Deconz service take over 20min to start

Hello !
I’m having a problem with my database being over 800MB now (it’s growing by itself) and the deconz service taking now over 20min to start.

Raspberry 4, raspbee II and everything up to date (bullseye, firmware 26780700, and Deconz 2.19.01) and I have around 80 devices (mostly Aqara).

The pproblem I have with the database corruption is quite old, but was managable befor it bloated to 800MB.

pi@piDomo:~/.local/share/dresden-elektronik/deCONZ $ ls -la
total 838972
drwxr-xr-x 3 pi pi      4096 Nov  1 10:53 .
drwxr-xr-x 3 pi pi      4096 Aug 31 17:26 ..
-rw-r--r-- 1 pi pi      2487 Nov  1 08:57 config.ini
drwxr-xr-x 2 pi pi      4096 Aug 31 17:26 devices
-rw-r--r-- 1 pi pi     15867 Aug 22 13:53 session.default
-rw-r--r-- 1 pi pi        35 Aug 31 17:26 zcldb.txt
-rw-r--r-- 1 pi pi 859066368 Nov  1 10:53 zll.db

I tried all I could to solve the problem :

  • backup and restore the database via the phoscon web GUI → but I lose half of my devices
  • used the “DB Browser for SQLite” app to try to delete some entries (could not manage to do it, it wouldnt allow me to delete rows).

The closest similiar issue I found was this : Database corruption - 10000s of duplicate sensors in the sensors table · Issue #3972 · dresden-elektronik/deconz-rest-plugin · GitHub and I tried the “solution” given with no success (I could not import the sql file into a database… to many “UNIQUE constraint failed”.

So now I do not know what to do. The database is clearly corrupted and I do not now how to clean it without loosing all my sensors and switches…

Any idea ?

Hi @bjorn. Just see your issue. Did you solve it ?

Hi @BabaIsYou !
After trying to solve the problem I figured that it would be quicker to start again from scratch. And that what I did. So far, no more bloating.

So far so good … There are several solutions, depending of the type of corruption …

Hi @bjorn, I have the same problem. zll.db grows over time. About 200 MB in half a year. DB Browser for SQLite has a feature “Compress Database”. After that my DB is about 700 KB. Last time some devices were lost. But it’s faster than start from scratch.


do you have the possibility to send us your zll.db? Possibly via Dropbox or Google Drive? We would need to take a look inside to work on the bug.


is there a way to upload zll.db?

Yes, as I said via Dropbox, Google Drive or We-Transfer for example.
After you do that, leave us a download link by mail.