pihole-FTL.db corrupted?

pi@raspberrypi:~ $ sqlite3 /mnt/raid1/Pi-hole/pihole-FTL.db "SELECT count(domain) FROM queries
WHERE(timestamp BETWEEN strftime('%s','2020-01-01') AND strftime('%s','2020-09-30'));"
5784610

Well, now we see something!

Ok, then I suspect you'd see data up to August 13, and likely none afterwards.

Still I can't see on the Long Term Data. If I query for 1 Month I get this:

Which is only data from yesterday. Now, if I query for 1 year I get this error:

So I am not sure if they are related.

Yes, PHP may run out of memory when trying to populate the UI for large amounts of queries, and 5,784,610 would be large.
Longterm-data | Graphics have a better chance of succeeding, as those will aggregate data before displaying it.

Well now when I Query data Graphic for 1 Year I can see data from March, etc where I had it set up but if I place "Last Month" I don't see anything, looks like to me more like a memory issue, anyway I think that is it, I think that at the end everything works but I am facing maybe memory issues. Any tips to increase the memory? My Raspberry Pi has 4 GB but I guess I am not allocating much for Pi-Hole.

Ok guys I finally figured out what happened.

So actually I have data until August, what happened is that because my pihole-FTL.db was mounted on my Raid 1 (External HD) something has changed on my raid config/permissions and the DB went in read-only mode. It means that by August it stopped recording. So, the DB is healthy at the end it is just the data that I was looking to the wrong place. Thanks a lot everyone that help me, I learned a lot.

1 Like

Yes, I've suspected August 13th before because that's what one of the timestamps in the ftl table decoded to. I just wasn't entirely sure about that table's content semantics, apart from db version.

Glad it's sorted now. :wink:

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