Subject: Re: bug#58520: Persistent failure to DNS-lookup hostname

From: Visuwesh <[email-masked]>
Date: Mon, 11 Dec 2023 17:24:24 +0530

[சனி நவம்பர் 04, 2023] Visuwesh wrote:

> [வெள்ளி நவம்பர் 03, 2023] Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:
>
>>>      3 Contacting host: search.brave.com:443
>>>      4 search.brave.com/0 Temporary failure in name resolution
>>>      5 cdn.search.brave.com/0 Temporary failure in name resolution
>>>      6 cdn.search.brave.com/0 Temporary failure in name resolution
>> [...]
>>>     11 Contacting host: search.brave.com:443
>>>     12 cdn.search.brave.com/0 Temporary failure in name resolution
>>
>>> Line nos. 1 and 2 are from url.el requests.  3--6 and 11--12 is from(
>>> connection to search.brave.com from eww for an internet search.
>>
>> Seems like the accesses failed just as well, so my guess is that the
>> only thing different with EWW is that it falls back on a cache or
>> something like that.
>
> You might be right actually.  If I face this next time, I should search
> something other than "asd."  If only eww recorded the time at which the
> request was made...

And that fateful day arrived again.  AFAICT, eww does not seem to hold
any cache (at least that's what searching for the word "cache" leads me
to believe) but url.el does seem to have some caching mechanism.  I
evaluated the sexp

    (let ((url-cache-expire-time 0)) (url-cache-prune-cache))

and tried searching in eww again and it did that weird thing where the
request failed with the same error but still managed to render the page
in the end.

So far, I think that this issue has to do with the DNS changing and
Emacs somehow not being aware of it?  If I can trace the DNS server
being used in the end by Emacs that would help confirm this.  I will try
asking around to see if I can do this.

P.S. It would be nice to have that patch that you mentioned that added a
     function that fixes the broken requests.