Query log periodically doesn't work - Unknown error occured while loading the data

Expected Behaviour:

I can open the Query log and Long term data sheets in the pihole web interface

Actual Behaviour:

I get the Error "An unknown error occured while loading the data." when I click on Query log or select a timefrace from Long term data

Debug Token:

dbfx5rovsk

Also noticed some errors from running the debug token, namely:

2019-01-09 15:08:16: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
2019-01-09 17:56:00: (mod_fastcgi.c.2543) FastCGI-stderr: PHP Notice: Undefined variable: api in /var/www/html/admin/scripts/pi-hole/php/add.php on line 14

2019-01-09 19:16:23: (mod_fastcgi.c.2543) FastCGI-stderr: PHP Notice: Undefined variable: api in /var/www/html/admin/scripts/pi-hole/php/add.php on line 14

2019-01-09 19:16:47: (mod_fastcgi.c.2543) FastCGI-stderr: PHP Notice: Undefined variable: api in /var/www/html/admin/scripts/pi-hole/php/add.php on line 14

2019-01-09 19:17:02: https://pr0mart.com/ is not a valid domain

currently there is 100MB RAM free, and I've searched the web and many ppl haven't had success with these kind of errors and increasing the php memory limit

Restarting the Pihole fixes the problem for a while. After a couple hours it happens again.
If I do nothing and wait, it will work again eventually.

Most likely, those errors are occurring because the API is unable to load all of those queries before timing out or running out of resources. This is something that will be fixed by the upcoming API and (new) web interface.

wouldn't everyone be having this problem then?
and why would it sporadically work and not work then?

Does it not work if you load just a small amount of queries, such as yesterday's (assuming you don't have tens of thousands of queries yesterday)?

The query log always only loads the last 100 queries, spread over 10 pages. I cannot select a specific amount.

When the pihole is having a fit, it will not load anything at all. Same goes for the long term query long.
I don't even get to the point of telling it how many queries I want.

My total query count over all devices is only 16k, as told to me by the dashboard

Make a debug token when it's "having a fit".

Edit: Is anything else running on the device?

Will do :smiley:

btw, flushing the logs doesn't help either. Only restarting.

I reinstalled raspbian + Pi and it happened again after only a day or two.

Nothing else running on the device

here we go: wvde0c2mmj

edit: so I noticed one of my lists was blocking pc-support-lf7a46.stream, which I assume as to do with the debug log?
not sure if it was uploaded properly.

also, interestingly enough, right after creating a debug token the list worked again. usually it stops working for a few hours at least

It seems that when it's "having a fit" blocking is being continually enabled and disabled, and FTL is reloading every time. @DL6ER have you seen anything like this?

That's odd.

Mind you, I've reinstalled the pihole once already when this first started happening. So it appears to be here to stay

This might happen when there are queries with invalid characters that break the JSON code that get's delivered by the API. I've seen a report for something similar some while I ago which was traceable down to control characters in the domain name.

I was never really able to reproduce this locally so I also never invented a fix for such scenarios.

1 Like

A post was split to a new topic: Long term database error on web GUI

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