Thank you @GBoulvin for your feedback. I’m still waiting at 41% for now — let’s hope it lasts!
Hello everyone,
Switched to DuckDB without a hitch, the database was 2.12GB before and is now 16.87MB
Great job and a big thank you…
Thanks everyone for your feedback! Very happy to see that for most of you the migration went through successfully ![]()
@Jluc Out of curiosity, what kind of storage are you on? SSD?
If you’re planning to have an ultra-fast Gladys home automation instance, and one that’s stable in the long term, I really recommend switching to a mini-PC. It’s night and day and it doesn’t cost that much (on leboncoin / or when buying refurbished there are great deals), and even new on Amazon it’s not that expensive ^^
Okay, a quick update,
the migration happened while I was away
and after my actions:
-rw-r–r-- 1 root root 4,1G sept. 3 18:15 gladys-production.db
-rw-r–r-- 1 root root 64K sept. 3 18:25 gladys-production.db-shm
-rw-r–r-- 1 root root 22M sept. 3 18:25 gladys-production.db-wal
-rw-r–r-- 1 root root 28M sept. 3 11:44 gladys-production.duckdb
-rw-r–r-- 1 root root 2,4M sept. 3 18:25 gladys-production.duckdb.wal
=>
-rw
I finally migrated to another machine (my NAS) without issues.
My database was:
-rw-r--r-- 1 root root 14G 29 août 13:18 gladys-production.db
The cleanup took over 48 hours.
Incredible result, once again bravo :

-rw-r--r-- 1 root root 57M 2 sept. 19:03 gladys-production.db
-rw-r--r-- 1 root root 40M 2 sept. 18:19 gladys-production.duckdb
On the NAS, Gladys runs without issues.
However, where I’m stuck is that on my Pi 3 (up to date and 64-bit) Gladys starts fine and is usable until I try to display a graph (no matter which one).
And then poof I get this error again and, more annoyingly, Gladys stops.
> gladys | node: ../src/duckdb/src/include/duckdb/execution/aggregate_hashtable.hpp:47: void duckdb::aggr_ht_entry_t::SetPointer(duckdb::data_t* const&): Assertion `(reinterpret_cast<uint64_t>(pointer) & SALT_MASK) == 0' failed.
> gladys exited with code 0
So I tried with a fresh Gladys installation, I add a temperature sensor and a graph. Result: same issue.
So I think it’s related to the Pi 3 or the distro…
@pierre-gilles: this is a case without migration, it seems to me that you reworked the querying system, is the data coming from duckdb?
uname -a
Linux rpi3 6.6.31+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.31-1+rpt1 (2024-05-29) aarch64 GNU/Linux
cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 12 (bookworm)"
NAME="Raspbian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Who on a Pi 3 has successfully performed a migration? If so, on which distro?
Does anyone have ideas / info?
I’m willing to do a reinstall, but only if there’s a glimmer of hope.

Have you tried updating Docker?
docker --version
Docker version 27.2.0, build 3ab4256
that’s the latest and on the NAS, I’m on 26
@ProtZ you should make sure you’re running the correct Docker image architecture on your Pi.
For that you can run:
docker image inspect gladysassistant/gladys:v4
And look for the « Architecture » line.
Normally in your case it should be arm64
Hello, well I’m in a real mess!
The DuckDB migration was done. The cleanup/purge, although long, was in progress!
And then, for some reason I don’t know, my server started an upgrade of Ubuntu to 24.04 LTS, and the server crashed, so it needs to be reinstalled!
I hope that after reinstalling the server I will be able to use the gladysplus backup to avoid having to redo everything!
@pierre-gilles you’re a genius!
c’était bien l’image téléchargée qui était en 32 bits.
I can’t explain it right now (I had cleaned everything beforehand, the install is very recent, …)
To fix the problem, I added in the service of my docker-compose.yml:
platform: linux/arm64
A thousand thanks
If you ever need help, don’t hesitate to create a specific thread ![]()
My turn to share a short experience report!!
Migration successful.
After purging the SQLite states, the task had errored but on the migration summary there were 0 SQLite states, so I ran the cleanup which took some time
! As a result my backup went from 5.2GB to 2.75GB! I then ran the SQLite purge job again and it succeeded! After cleaning my database dropped to 275MB! Great space savings
Ah ok j’ai pas lu tout le thread !! Yes indeed, I get message notifications quite often, especially for motion detection when I’m not at home, but my phone’s location sometimes messes everything up so the messages go haywire!
Mystery solved then!
Again, great job anyway
So yes, without a doubt, I had an incident that screwed up => 3,000,000 identical rows in t_message => 1GB freed once deleted manually ^^
Oh yes, really ![]()
![]()
![]()
The migration is finished on my Pi. Migration, purge and cleanup OK. BUT now, a lot of stuff is messed up.
Sometimes I log in and it tells me that my dashboard is not configured then after a few refreshes I get my dashboards back. But the display of present users, the weather and my crypto graphs coming from Node-RED do not appear.
If I connect via Gladys Plus, 1x/2, it tells me that it is not connected to the gateway and there are no users to select. Same thing from the Android App
In the settings, the pages are empty. I have to refresh many times and at some point I recover the data.
Many scenes simply no longer run.
I should clarify that this happens on Brave, Chrome and Edge.
It’s a complete mess, I think I’ll reinstall Gladys completely on my Pi. ![]()
Are you sure the purge is finished? It can take hours, even days during which Gladys is a bit out of it (especially on RPi)!
Have you restarted the container (or the RPi)?
Please note that the accuracy of the number of states in SQLite on the System view is not real. It may show « 0 » even though the purge has not finished. Do not hesitate to rerun if needed (it will become faster and faster and be almost instantaneous when it is actually finished), then run another cleanup afterwards.




