Query log in UI stops or is empty, tail is working

The issue I am facing:

Query log in UI stops or is empty, log tail is working. Blocking and DNS queries seem to be working ok, this may be cosmetic. Windows domain controller is downstream and forwards all queries to pihole. Tried pihole -r for repair, rebooted server, no luck.

Details about my system:

Running on an Ubuntu 22.04 VM. Running unbound recursive services.
Core version is v6.0.5 (Latest: v6.0.5)
Web version is v6.0.2 (Latest: v6.0.2)
FTL version is v6.0.4 (Latest: v6.0.4)

What I have changed since installing Pi-hole:

Keep updated and patched, issue occurs since upgrading to v6.

Any help is appreciated.

Please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:

pihole -d

or if you run your Pi-hole as a Docker container:

docker exec -it <pihole-container-name-or-id> pihole -d

where you substitute <pihole-container-name-or-id> as required.

Token URL:

https://tricorder.pi-hole.net/JeHWtL3y/

Thanks!

Correction: host OS is Ubuntu 20.04

Your debug log shows the database is broken:

2025-03-23 20:40:01.229 EDT [81413/T81431] ERROR: ERROR: SQL query "DELETE FROM query_storage WHERE id IN (SELECT id FROM query_storage WHERE timestamp <= 1734914400 LIMIT (SELECT COUNT(*)/100 FROM query_storage));" failed: database disk image is malformed (SQLITE_CORRUPT)
2025-03-23 20:40:01.229 EDT [81413/T81431] WARNING: Database /etc/pihole/pihole-FTL.db is damaged and cannot be used.
2025-03-23 20:40:01.229 EDT [81413/T81431] ERROR: delete_old_queries_in_DB() failed!

Run these commands to move the existing database to a new file name. Pi-hole will create a fresh database.

sudo service pihole-FTL stop

sudo mv /etc/pihole/pihole-FTL.db /etc/pihole/pihole-FTL-old.db

sudo service pihole-FTL start

It is working now, thank you!