Pi-hole becomes unresponsive during pihole -d and -q

This is not a valid regular expression. The interpretation of (\.|^)* is:

An arbitrary number of dots or line starts

Does "an arbitrary number of line starts" make sense? I guess not and awk might die while trying to reference to the same anchor multiple times. This may very well end up in an infinite loop.

You either want to

  1. Just get rid of the *. This would block metric.gstatic.com and all of its subdomains.
  2. If you want to block anything ending in metric.gstatic.com (so also ABCDEFmetric.gstatic.com), the regex should not have an initial anchor and should look like:
    metric\.gstatic\.com$
    

What do you really want to achieve with this regex? We can fix it together if you like.

1 Like