I full agree. Yes, I am slightly confused now. Did it always restart and was not responsive afterwards? It seems like you needed to restart it manually before, also we have seen no traces of a restart in previous discussions of the problem, e.g.,
So the issue now looks like: Something on your system is restarting FTL, it restarts as asked and the restarted process does not respond at all. But another (manual) restart fixes it?
Could you:
Wait until in unresponsive mode
Run sudo pihole-FTL config debug.queries true
Try to send a few queries - nothing shows up at all in FTL.log ?
Does it only stop responding over the VPN or does it even stop responding locally, i.e., 127.0.0.1 and ::1 ? I wonder if the VPN may have some issues with a process shutting down and immediately rebinding the same port (53).
2023-12-27 12:34:02.113 [67900/F58120] ERR: SQLite3 message: database is locked in "SELECT hwaddr FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? GROUP BY ip HAVING max(lastSeen));" (5)
2023-12-27 12:34:02.114 [67900/F58120] ERR: getMACfromIP("49.12.189.79") - SQL error prepare: database is locked
2023-12-27 12:34:03.117 [67900/F58120] ERR: SQLite3 message: database is locked in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (5)
2023-12-27 12:34:03.117 [67900/F58120] ERR: getNameFromIP("49.12.189.79") - SQL error prepare: database is locked
2023-12-27 12:34:04.120 [67900/F58120] ERR: SQLite3 message: database is locked in "SELECT interface FROM network JOIN network_addresses ON network_addresses.network_id = network.id WHERE network_addresses.ip = ? AND interface != 'N/A' AND interface IS NOT NULL;" (5)
2023-12-27 12:34:04.120 [67900/F58120] ERR: getIfaceFromIP("49.12.189.79") - SQL error prepare: database is locked
These errors are not issues themselves, they just indicate that the database was busy at that time. This can happen due to the multi-processing nature of FTL. Even more when you have external scripts working with the database, but even without. I don't worry about them. This will simply be retried a few seconds/minutes later and will eventually succeed. Any changes in between are cached by FTL so no data is lost (if there was not power outage or something).