Database is locked error

Expected Behaviour:

Proper deletion of unreachable ad-lists from Pi-hole diagnosis page. Besides that domains should be added to whitelist or blacklist without these errors.

Actual Behaviour:

It's possible to delete unreachable ad-lists from Pi-hole diagnosis page, but they appear again after reboot and sometimes web interface show "Database is locked" error during deletion. Also there are errors in FTL log
cat /var/log/pihole/FTL.log | grep -c "database is locked"
8

Debug Token:

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

Additional info:

groups www-data
www-data : www-data pihole


stat /var/www/html/
  File: /var/www/html/
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: b301h/45825d    Inode: 133709      Links: 3
Access: (0775/drwxrwxr-x)  Uid: (   33/www-data)   Gid: (   33/www-data)
Access: 2023-08-17 13:58:18.466690785 +0200
Modify: 2023-08-17 14:00:23.439465417 +0200
Change: 2023-08-17 14:03:46.602222077 +0200
 Birth: 2023-08-17 13:58:18.466690785 +0200


ls -lah /etc/pihole/gravity.db
-rw-rw-r-- 1 pihole pihole 486M Aug 17 21:46 /etc/pihole/gravity.db


grep pihole /etc/group
pihole:x:995:www-data
pihole:x:1005:www-data


grep pihole /etc/passwd
pihole:x:999:1005::/home/pihole:/usr/sbin/nologin


grep pihole /etc/sudoers.d/pihole
www-data ALL=NOPASSWD: /usr/local/bin/pihole


sqlite3 /etc/pihole/pihole-FTL.db "PRAGMA integrity_check;"
ok

Also I searched through these topics

https://discourse.pi-hole.net/t/database-locked-again/63672
but no luck.

That is the expected behaviour.

You are just clearing the messages about unreachable adlists.
The adlists themselves stay as they are.
If you should decide to remove adlists (e.g. because they are no longer maintained and accessible), you should do so via Pi-hole's Adlist group management.

Now I see, thank you!

But during blocklist deletion from /admin/groups-adlists.php I faced with one database error. Looks like these log's records were made at the same time:

cat /var/log/pihole/FTL.log
..................................
[2023-08-18 13:27:13.233 1165/T1298] Blocking status is enabled
[2023-08-18 13:27:19.566 1165M] Received: Real-time signal 0 (34 -> 0)
[2023-08-18 13:27:19.668 1165/T1298] Compiled 1 whitelist and 0 blacklist regex filters for 6 clients in 20.9 msec
[2023-08-18 13:27:19.668 1165/T1298] ADLIST WARNING: Adlist with ID 17 (https://schakal.ru/hosts/hosts.txt) was inaccessible during last gravity run
[2023-08-18 13:27:20.308 1165/T1298] ADLIST WARNING: Adlist with ID 85 (https://v.firebog.net/hosts/static/w3kbl.txt) was inaccessible during last gravity run
[2023-08-18 13:27:20.460 1165/T1298] Blocking status is enabled
[2023-08-18 13:27:24.462 1165M] Received: Real-time signal 0 (34 -> 0)
[2023-08-18 13:27:24.517 1165/T1298] Compiled 1 whitelist and 0 blacklist regex filters for 6 clients in 42.8 msec
[2023-08-18 13:27:24.518 1165/T1298] ADLIST WARNING: Adlist with ID 17 (https://schakal.ru/hosts/hosts.txt) was inaccessible during last gravity run
[2023-08-18 13:27:25.128 1165/T1298] Blocking status is enabled

I don't see new errors for now. We will see how it goes.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.