pi-hole / FTL

The Pi-hole FTL engine
https://pi-hole.net
Other
1.39k stars 196 forks source link

SQLITE database locked, unable to write network clients to database #2093

Closed moya2162 closed 3 weeks ago

moya2162 commented 1 month ago

Versions

Docker Tag dev-localbuild Core vDev (development, 1a487069) FTL vDev (development, 2f02f5c0) Web interface vDev (development, cd916b17)

Platform

Expected behavior

Network overview under tools should populate with clients.

Actual behavior / bug

No clients are being added to the network database and information being tracked.

Image

Setup Information

This is a fresh install. No previous data. Allowed Pihole to create its file system and databases from scratch.

Logs

2024-10-21 19:40:01.023 ERROR export_queries_to_disk(disk.INSERT OR IGNORE INTO disk.domain_by_id SELECT * FROM domain_by_id): Cannot export subtable: database is locked
2024-10-21 19:40:01.024 ERROR export_queries_to_disk(disk.INSERT OR IGNORE INTO disk.client_by_id SELECT * FROM client_by_id): Cannot export subtable: database is locked
2024-10-21 19:40:01.024 ERROR export_queries_to_disk(disk.INSERT OR IGNORE INTO disk.forward_by_id SELECT * FROM forward_by_id): Cannot export subtable: database is locked
2024-10-21 19:40:01.024 ERROR export_queries_to_disk(disk.INSERT OR IGNORE INTO disk.addinfo_by_id SELECT * FROM addinfo_by_id): Cannot export subtable: database is locked
2024-10-21 19:40:01.025 ERROR export_queries_to_disk(disk.UPDATE disk.sqlite_sequence SET seq = (SELECT seq FROM sqlite_sequence WHERE disk.sqlite_sequence.name = sqlite_sequence.name)): Cannot export subtable: database is locked
2024-10-21 19:40:01.025 ERROR ERROR: SQL query "INSERT OR REPLACE INTO disk.ftl (id, value) VALUES ( 1, 1729564781.668662 );" failed: database is locked (SQLITE_BUSY)
2024-10-21 19:40:01.025 ERROR export_queries_to_disk(): Cannot update timestamp: database is locked
2024-10-21 19:40:01.026 ERROR ERROR: SQL query "UPDATE disk.counters SET value = value + 3053 WHERE id = 0;" failed: database is locked (SQLITE_BUSY)
2024-10-21 19:40:01.026 ERROR export_queries_to_disk(): Cannot update total queries counter: database is locked
2024-10-21 19:40:01.026 ERROR ERROR: SQL query "UPDATE disk.counters SET value = value + 373 WHERE id = 1;" failed: database is locked (SQLITE_BUSY)
2024-10-21 19:40:01.027 ERROR export_queries_to_disk(): Cannot update blocked queries counter: database is locked
2024-10-21 19:40:02.034 ERROR ERROR: SQL query "DELETE FROM query_storage WHERE id IN (SELECT id FROM query_storage WHERE timestamp <= 1721702401 LIMIT (SELECT COUNT(*)/100 FROM query_storage));" failed: database is locked (SQLITE_BUSY)
2024-10-21 19:40:02.034 WARNING Database busy in delete_old_queries_in_DB()!
2024-10-21 19:40:03.038 ERROR ERROR: SQL query "DELETE FROM network_addresses WHERE lastSeen < 1721702402;" failed: database is locked (SQLITE_BUSY)
2024-10-21 19:41:01.082 ERROR export_queries_to_disk(): Failed to export queries: database is locked
2024-10-21 19:41:01.082 INFO     SQL query was: "INSERT INTO disk.query_storage SELECT * FROM query_storage WHERE id > ? AND timestamp < ?"
2024-10-21 19:41:01.082 INFO     with parameters: id = 1, timestamp = 1729564830.080100
2024-10-21 19:41:01.083 ERROR export_queries_to_disk(disk.INSERT OR IGNORE INTO disk.domain_by_id SELECT * FROM domain_by_id): Cannot export subtable: database is locked
2024-10-21 19:41:01.083 ERROR export_queries_to_disk(disk.INSERT OR IGNORE INTO disk.client_by_id SELECT * FROM client_by_id): Cannot export subtable: database is locked
2024-10-21 19:41:01.084 ERROR export_queries_to_disk(disk.INSERT OR IGNORE INTO disk.forward_by_id SELECT * FROM forward_by_id): Cannot export subtable: database is locked
2024-10-21 19:41:01.084 ERROR export_queries_to_disk(disk.INSERT OR IGNORE INTO disk.addinfo_by_id SELECT * FROM addinfo_by_id): Cannot export subtable: database is locked
2024-10-21 19:41:01.084 ERROR export_queries_to_disk(disk.UPDATE disk.sqlite_sequence SET seq = (SELECT seq FROM sqlite_sequence WHERE disk.sqlite_sequence.name = sqlite_sequence.name)): Cannot export subtable: database is locked
2024-10-21 19:41:01.085 ERROR ERROR: SQL query "INSERT OR REPLACE INTO disk.ftl (id, value) VALUES ( 1, 1729564834.678974 );" failed: database is locked (SQLITE_BUSY)
2024-10-21 19:41:01.085 ERROR export_queries_to_disk(): Cannot update timestamp: database is locked
2024-10-21 19:41:01.085 ERROR ERROR: SQL query "UPDATE disk.counters SET value = value + 3068 WHERE id = 0;" failed: database is locked (SQLITE_BUSY)
2024-10-21 19:41:01.086 ERROR export_queries_to_disk(): Cannot update total queries counter: database is locked
2024-10-21 19:41:01.086 ERROR ERROR: SQL query "UPDATE disk.counters SET value = value + 378 WHERE id = 1;" failed: database is locked (SQLITE_BUSY)
2024-10-21 19:41:01.086 ERROR export_queries_to_disk(): Cannot update blocked queries counter: database is locked
2024-10-21 19:41:02.089 ERROR ERROR: SQL query "DELETE FROM network_addresses WHERE lastSeen < 1721702461;" failed: database is locked (SQLITE_BUSY)
rdwebdesign commented 1 month ago

Please generate a debug log using the command line:

moya2162 commented 1 month ago

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

moya2162 commented 3 weeks ago

Initially appears issue may be fixed as of following build comments:

10/27/2024

Docker Tag dev-localbuild Core vDev (development, 250fbd21) FTL vDev (development, 3dd756da) Web interface vDev (development, 7cf66a51)

Will monitor for a bit before confirming closure of issue.