Long term data query producing Error 500 (Internal Server Error)

Hi all,

I'm running the most uptodate v5 build on the latest Raspberry Pi OS on a Pi 3b+, and it runs pretty well except for a couple of issues.

When trying to view Long Term Data -> Query Log, I can bring back queries for Today, Yesterday and 7 Days ago however going back further (ie. 30 days, this month...) I'm seeing an Internal Server Error (500) being returned when calling /api_db.php usually after a few seconds (5 or so).

Is there perhaps an issue with the webserver/php timing out too quickly?

My debug token: qaw8tl0llk

No, this is likely not a timeout but hitting a memory limit. Search the forum for PHP memory. There are dozens of posts with details how to fix this and also why this limitation exists. I think they are working on overhauling this with Pi-hole v6.0, but I'm not sure about this.

As Coro already said, it is like a php memory issue. You can increase the limit by
changing memory_limit in /etc/php/7.3/cgi/php.ini and

sudo service lighttpd force-reload

Adjust to limit according to the amout of RAM you have.

See here for more details:

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