You could increase PHP memory size - but I'm still not sure why pihole needs so much for displaying the regular query log.