PiHole constantly runs at over 100% CPU utilization and is virtually unusable

Are there any queries in /var/log/pihole.log?

I was looking at pihole_debug.log and see these lines repeated several times (not sure what that means)

2017-08-08 08:44:44: (mod_fastcgi.c.2702) FastCGI-stderr: PHP Warning:  socket_read(): unable to read from socket [104]: Connection reset by peer in /var/www/html/admin/scripts/pi-hole/php/FTL.php on line 98
2017-08-08 08:44:44: (mod_fastcgi.c.2702) FastCGI-stderr: PHP Warning:  socket_read(): unable to read from socket [104]: Connection reset by peer in /var/www/html/admin/scripts/pi-hole/php/FTL.php on line 98
2017-08-08 08:44:44: (mod_fastcgi.c.2702) FastCGI-stderr: PHP Warning:  socket_read(): unable to read from socket [104]: Connection reset by peer in /var/www/html/admin/scripts/pi-hole/php/FTL.php on line 98
2017-08-08 08:44:44: (mod_fastcgi.c.2702) FastCGI-stderr: PHP Warning:  socket_read(): unable to read from socket [104]: Connection reset by peer in /var/www/html/admin/scripts/pi-hole/php/FTL.php on line 98

Nothing unusual in pihole.log....bunch of DNS queries there

FTL never finishes reading the log and so never opens the socket so that it can communicate with the web interface. It's in a cycle of reading the log then somehow thinking that you flushed the log, making it read it all over again. Do you have anything flushing the log, by chance?

BTW....the pihole.log file is over 2GB

Don't know what would be flushing these logs?

Hm, that's not good. What's the output of this command? (use this if you want: How do I debug my Pi-hole installation?)

tail /var/log/pihole.log
pi@raspberrypi:~ $ tail /var/log/pihole.log
Aug  8 12:11:42 dnsmasq[725]: query[PTR] 40.2.168.192.in-addr.arpa from 127.0.0.1
Aug  8 12:11:42 dnsmasq[725]: config 192.168.2.40 is NXDOMAIN
Aug  8 12:13:07 dnsmasq[725]: query[PTR] 8.8.8.8.in-addr.arpa from 127.0.0.1
Aug  8 12:13:07 dnsmasq[725]: cached 8.8.8.8 is google-public-dns-a.google.com
Aug  8 12:13:07 dnsmasq[725]: query[PTR] 4.4.8.8.in-addr.arpa from 127.0.0.1
Aug  8 12:13:07 dnsmasq[725]: cached 8.8.4.4 is google-public-dns-b.google.com
Aug  8 12:15:09 dnsmasq[725]: query[PTR] 8.8.8.8.in-addr.arpa from 127.0.0.1
Aug  8 12:15:09 dnsmasq[725]: cached 8.8.8.8 is google-public-dns-a.google.com
Aug  8 12:15:09 dnsmasq[725]: query[PTR] 4.4.8.8.in-addr.arpa from 127.0.0.1
Aug  8 12:15:09 dnsmasq[725]: cached 8.8.4.4 is google-public-dns-b.google.com

What are the permissions of the directories in which pihole.log is contained? I think FTL is failing to detect if the file has been flushed or not over and over again.

https://hastebin.com/lagicobucu.hs

Hm, that looks ok. For now, run

sudo service pihole-FTL stop

to stop FTL from running.

But, looks like that will not solve the problem

Did FTL not stop? If so, kill the process via kill $(pidof pihole-FTL)

FTL did stop after that command. But, I am guessing that now the ads will not be blocked :frowning:

Ads will be blocked still. The web interface just won't show stats.

I see....that should be fine for now. I will keep an eye out for any possible resolution you may have for me to access the web interface. It is kind-a-cool to keep looking at those beautiful charts :slight_smile:

I am looking into why it might be acting like this, but I don't think I'll be able to come up with the solution until @DL6ER is available.

Thanks for looking into it...appreciate your assistance.

What is the output of this command?

stat /var/log/pihole.log
pi@raspberrypi:~ $ stat /var/log/pihole.log
  File: ‘/var/log/pihole.log’
  Size: 37842     	Blocks: 88         IO Block: 4096   regular file
Device: b302h/45826d	Inode: 1249        Links: 1
Access: (0640/-rw-r-----)  Uid: (  109/ dnsmasq)   Gid: (    0/    root)
Access: 2017-08-08 12:20:53.849998886 -0400
Modify: 2017-08-08 18:09:54.520139022 -0400
Change: 2017-08-08 18:09:54.520139022 -0400
 Birth: -

Just and FYI...I deleted that file sometime this afternoon and rebooted Pi

Try running these commands (will start up FTL):

sudo chmod 0644 /var/log/pihole.log
sudo service pihole-FTL start
tail -F /var/log/pihole-FTL.log

That last command will start streaming the FTL log. Try sending the output. If it's working correctly, it should stop outputting text shortly after it starts up (it shouldn't repeat itself over and over again).