I am having an upgrade issue. This has been going on for at least a year. My work around is never reboot the Raspberry Pi unless absolutely necessary.
I am running 2 pi-holes (Rpi-3s) on my network and this issue applies to both and to several different update attempts (issue is repeatable).
I have upgraded to Pihole v5.6 FTL v5.11 and Web Interface 5.8. The expected behavior is the upgrade remains after a reboot of the Rpi-3.
After upgrade everything is working fine. But after a reboot, Pi-hole comes up running Pihole v5.2.4, FTL v5.7 and Web interface 5.4 but still processing DNS requests. Also changes made to the Web interface on Pihole v5.6 are lost, and "Conditional Forwarding" which was unchecked before reboot is checked after reboot.
Your first debug log shows your database to be corrupted:
*** [ DIAGNOSING ]: contents of /var/log
-rw-r--r-- 1 pihole pihole 231K Nov 19 20:20 /var/log/pihole-FTL.log
-----head of pihole-FTL.log------
[2021-06-03 08:59:00.579 13031/T13035] Notice: Database size is 1571.80 MB, deleted 173 rows
[2021-11-19 19:43:00.133 566/T570] SQLite3 message: database corruption at line 81498 of [a26b6597e3] (11)
[2021-11-19 19:43:03.073 566M] SQLite3 message: disk I/O error in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (5898)
[2021-11-19 19:43:03.073 566M] getAliasclientIDfromIP("192.168.128.232") - SQL error prepare: disk I/O error
[2021-11-19 19:43:03.073 566M] WARN: getOverTimeID(1637371500): 24554 is too large: 1622639100
[2021-11-19 19:43:03.074 566M] getMACfromIP("192.168.128.232") - Database not available
-----tail of pihole-FTL.log------
[2021-11-19 20:20:00.009 24633/T24637] SQLite3 message: disk I/O error in "DELETE FROM network_addresses WHERE lastSeen < 1605838800;" (5898)
[2021-11-19 20:20:00.009 24633/T24637] ERROR: SQL query "DELETE FROM network_addresses WHERE lastSeen < 1605838800;" failed: disk I/O error
[2021-11-19 20:20:00.019 24633/T24637] SQLite3 message: API call with invalid database connection pointer (21)
[2021-11-19 20:20:00.019 24633/T24637] SQLite3 message: misuse at line 166280 of [5c9a6c0687] (21)
[2021-11-19 20:20:00.019 24633/T24637] Error while trying to close database: bad parameter or other API misuse
In addition, the I/O errors would suggest there is an issue with your storage device.
(Your time seems also off, but that's not likely related to your upgrade issue.)
You wouldn't employ some kind of in-memory filesystem where you also store (some of) Pi-hole's data?
Or, as you run two Pi-holes, you wouldn't try to share databases among them?
Your second debug log contains only unintelligible trash at the beginning
That again would suggest a storage device issue (or maybe just a problem with uploading the log).
Could you check whether /var/log/pihole_debug.log would contain the same trashy lines at the start (presuming that you haven't created a new debug log in the meantime)?
If it is indeed your sd card storage, those failures may be prompted by an insufficient power supply for your RPi. You chould check your RPi's system logs for any recent occurences of voltage issues: