New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error 500 on api.php?getAllQueries #465
Comments
Works fine for me..check the size of your log file. 2.6.2 1.1.7
|
was an issue with php, since the mahalaka list is huge. its been fixed in newer versions. time to update :) |
@7h3ju57 Duly noted, updating :) |
Update done, error stays exactly the same. |
Only other thing i can think of is increase the php memory limit and On Wed, Apr 13, 2016, 4:24 PM G notifications@github.com wrote:
|
what is the size of your pihole.log? |
/etc/php5/*/php.ini |
curious perform |
@CDeeRON ran the command. |
Did you find php.ini? You can try "whereis php" also |
Set the available memory to 256 in /cgi/php.ini from 128, and to 256 in /cli/php.ini from -1. Error still present. :( |
Running apt-get update && apt-get upgrade. We'll see if that solves anything. |
I'm going to say wasnt the right location, should be under /etc/php... On Wed, Apr 13, 2016, 4:49 PM G notifications@github.com wrote:
|
full path was /etc/php5/cli/php.ini and /etc/php5/cgi/php.ini |
i receive the errors below when using the api |
when i remove the Mahalaka list and run gravity the API becomes functional and no errors in log |
I just realized that /etc/pihole/gravity.list is listed as an advertizer whith Mahalaka... Maybe that's the source of the problem ? Let me take a look. I can't seem to find a reason for which gravity.list would be detected as a pi-holable domain with mahalaka. I'll try and search deeper sometime this week. If anyone wants to dig further, please do. |
@CDeeRON could you give me the procedure to generate the log you just did ? I don't find the same messages in /var/log/ |
The reason localhost and gravity show up as blocked is because they are being loaded off of the pi. All queries redirected to the pi are listed as "blocked" although some are just from normal web interface usage. The php error is most likely coming from memory limits, which can't be easily solved by us, since we are not actually paid to do this, until we switch to using a database. We are looking for ways to limit this from occurring until then, and have made a few optimizations already. :) |
@Windyo Sorry I was away from my computer. The log from which I reported the errors should be located /var/log/pihole.log. If you don't see it then try enabling debug for pihole with |
@CDeeRON no problem at all, it's already cool you're helping me out. To stop the debug session should I just run the command again ? I'll report back once / if I find anything |
I found the entries listed as "bad name" are prefixed with It outputs to screen what you need to do, CRTL C |
I found multiple entries that had a strange format for the moment : |
If the log is flushed daily why do we need the api call |
@CDeeRON my log is empty after running it and trying to access the api. I'll try to dig more later on. |
have you checked the lighttpd log? |
@7h3ju57 see error below
|
Try this comment out the following lines like have below
|
Also increase memory for php in file |
I can't reproduce the issue after these changes with a clean install |
OK, trying to catch up here. I'm confused @CDeeRON, why are you commenting out that section of |
With the Mahalaka list enabled it makes the gravity.list to much for PHP to handle it seems. Also the end result for both the API |
That section of the code is to match domains on the queries page with I'm wondering if over a million domains is too much to load into an array.... |
Maybe that info could be added the the query log? To prevent from having to pull from both files? |
So the top query is blocked, and the second is forwarded onto google. I guess maybe (not tried this as I'm at work) we could change the logic up when reading in the log to say something like (warning... pseudo-code ahead!):
|
@CDeeRON confirmed working after commenting out the lines. Also refreshed the hosts file to integrate the "bad domains" I removed before : still works. Seems "bad domains" weren't an issue after all. I'll give the pihole a spin this week-end and see if anything deviates from normal behavior. |
Quick testing seems to indicate that while addresses are being pi-holed, they are no longer displaying as such in the queries.php view., as predicted by @PromoFaux. I would rather that than an error, so I'll keep it that way :) Thanks to everyone involved, I'll continue digging and see if I can find a solution to the underlying cause. |
I've just sat down at home with a beer and my favourite editor... so I'll have a bash at translating that pseudo-code above to something that actually works! |
I'm going to move this issue over to the AdminLTE repo for easier tracking, as it's an issue with the PHP and not the bash scripts! |
Addresses pi-hole/pi-hole#465
Expected Behaviour:
api.php?getAllQueries should return a list of all queries
Actual Behaviour:
an error 500 is thrown.
the other calls to api.php actually work.
Steps to reproduce this issue:
go to admin
go to "all queries"
an AJAX error is thrown.
Try to go to /api.php?getAllQueries
an error 500 is returned.
Mahalaka list used, but the other parts of the web interface work fine:
The only thing failing is "getAllQueries" which shouldn't be impacted by the presence of the list.
Setup:
Pi-hole Version v2.5.3 [clean install]
Web Interface Version v1.1.7
Raspberry Pi 3
Mahalaka list
The text was updated successfully, but these errors were encountered: