With your large number of blocked domains in gravity (a few million), you may be pushing your memory limits, depending on what hardware you are running. With this many domains in gravity and using the NULL blocking mode, there have been reports of high CPU and RAM usage. Here is one related thread:
What is the output of the following commands from the Pi terminal:
echo ">stats" | nc localhost 4711
free -m
df -a -h
An additional note, and perhaps related to your problem. From your debug log, there are some abnormal line entries in your ad lists file (/etc/pihole/adlists.list). This list is normally populated with web addresses of each blocklist to which you subscribe.
Your list has some individual domains listed (lines 21 to 48), and an asterisk in line 54.
Edit this file and remove these lines, then rebuild gravity with pihole - g