[SOLVED] Large # of DNS queries by Proxmox

inxsible

Active Member
Feb 6, 2020
139
8
38
Hi,

My Proxmox seems to be requesting a large number of DNS queries and I was wondering why that was. I have about 24K queries from the proxmox box in 25 hours which accounts to about 40% of the queries.
1664987093416.png

The top queried domain is for my NAS box -- probably because my NAS is configured as a storage on the Proxmox box. Is there a reason why it keeps querying for the NAS box so often?
1664987191979.png


I guess the default TTL for local domain devices is 10 seconds, but I still wanted to confirm why it does 2 query requests every 10 seconds or so.
1664987328902.png

I am trying to see if I can reduce unnecessary DNS queries because I was planning to move to the NextDNS free tier which has a limit of 300K requests per month.
 

Attachments

  • 1664987213846.png
    1664987213846.png
    105.8 KB · Views: 4
Last edited:
In your storage config are you using hostname by chance? There are health checks that are run constantly against external storage, especially NFS. Short TTL would also play a role in number of lookups generated.
The easy fix is to add the NAS host into /etc/hosts file on PVE or switch to using IP in /etc/pve/storage.cfg


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
In your storage config are you using hostname by chance? There are health checks that are run constantly against external storage, especially NFS. Short TTL would also play a role in number of lookups generated.
The easy fix is to add the NAS host into /etc/hosts file on PVE or switch to using IP in /etc/pve/storage.cfg


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
I was using hostnames in the storage config. Weirdly, I am not using the hostname for the pbs server but using hostname for the freenas server. I have just made the change to use the IP address in the storage config. I will monitor it for 1 more day and see how many queries it reduces just as an exercise.

There's a slight concern of remembering to change the IP -- in case I ever change the IP of my NAS box. But that's not something that happens often enough to worry about to be honest.

Thanks @bbgeek17
 
Hi @bbgeek17 ,

Changing to the IP address in the storage.cfg did seem to reduce the number of DNS queries, however, my NAS datastores in Proxmox now show a question mark indicating "Status Unknown".
All my containers which use these NAS drives as shares seem to be working and can access those drives as well, so I am not quite sure why the UI is indicating a problem with those datastores.

Also another thing that I noticed (not sure if this was happening previously to making the change in storage.cfg) as well was that my NAS is now making DNS queries for my proxmox box. However it is not using the hostname for the DNS queries, but rather checking the IP of the Proxmox box
Now my top queried domain is which accounts for about 30% of DNS queries. Since these are local internal addresses, I wonder why it needs so many DNS queries.
Code:
254.5.16.172.in-addr.arpa    11,376          29.26%

Here are the details of the top queried domain.
Code:
10:10:59    10/7/2022   254.5.16.172.in-addr.arpa     Type: PTR, Plain DNS   Processed   0.57 ms     172.16.5.250   freenas.mydomain.com

10:10:59    10/7/2022   254.5.16.172.in-addr.arpa     Type: PTR, Plain DNS   Processed   0.41 ms     172.16.5.250   freenas.mydomain.com

10:10:59    10/7/2022   254.5.16.172.in-addr.arpa     Type: PTR, Plain DNS   Processed   0.60 ms     172.16.5.250   freenas.mydomain.com

10:10:59    10/7/2022   254.5.16.172.in-addr.arpa     Type: PTR, Plain DNS   Processed   0.56 ms     172.16.5.250   freenas.mydomain.com
 
Proxmox now show a question mark indicating "Status Unknown".
make sure you fully reload your browser, perhaps restart the services on each node in cluster:
systemctl try-reload-or-restart pvedaemon pveproxy pvestatd

s well was that my NAS is now making DNS queries for my proxmox box.
its doing reverse lookup on IP, thats what DNS is for... If you are concerned with DNS queries costing you money - either place all possible IPs in /etc/hosts on each client, or build your own caching/secondary DNS.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
make sure you fully reload your browser, perhaps restart the services on each node in cluster:
systemctl try-reload-or-restart pvedaemon pveproxy pvestatd
Tried reloading & restarting. Didn't work. Maybe I'll try a reboot. I haven't rebooted in 236 days. Might as well.
If you are concerned with DNS queries costing you money - either place all possible IPs in /etc/hosts on each client, or build your own caching/secondary DNS.
Nope, not costing me money. I am running Unbound in recursive resolver mode with AdGuard intercepting the queries for ad-blocking. At one point I was thinking of moving to NextDNS free tier -- which is why I started investigating why the individual boxes are making that many DNS queries.

But I have decided against it, since Unbound in recursive mode has been working without a glitch for me since the past 8 odd years. This was just an exercise in learning more about why those boxes are making so many DNS queries, that's all.

I had 2 entries for the NAS -- one for storage and one for PBS. I changed one back to using the hostname instead of IP and sure enough the ? "Status Unknown" went away on that datastore even without having to reload or restart any pve services.

I might as well just switch back to using the hostnames as it doesn't cost me anything, but it was good to know the details.

Thanks for your help.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!