Deluge 1.3.15 caching DNS?

General support for problems installing or using Deluge
Post Reply
cegueira
New User
New User
Posts: 8
Joined: Thu Oct 18, 2018 5:19 pm

Deluge 1.3.15 caching DNS?

Post by cegueira »

I have previously been running Deluge 1.3.12 successfully on an old Pi2. I have got a Pi 3B+, and if I make a change to the hosts file Deluge only acknowledges this change if I restart the daemon, pinging from console is affected by the changes to the hosts file.

Does deluge cache DNS queries?
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluge 1.3.15 caching DNS?

Post by Cas »

DNS caching for what? I don't think it is unusual for an application to require restarting if you change the hosts file. You usually need to restart machine or network stack anyway.
shamael
Compulsive Poster
Compulsive Poster
Posts: 667
Joined: Sat Oct 08, 2016 9:28 am

Re: Deluge 1.3.15 caching DNS?

Post by shamael »

The application does not cache DNS addresses but the underlying OS may. However the hosts file entries take precedence over the DNS (there are priorities when talking about the DNS resolution). The case described links more to a non-resolution: if the application already requested the resolution of the address it keeps using the IP for the time of the connection.

Example: launch an infinite ping to an URL and change the hosts file. The address resolved will not changed up to a stop/restart of the ping of if you open a new terminal session.
cegueira
New User
New User
Posts: 8
Joined: Thu Oct 18, 2018 5:19 pm

Re: Deluge 1.3.15 caching DNS?

Post by cegueira »

Hi,

I've solved the issue, don't know if it was due to the change of Debian versions but just in case it comes up for anyone else:
edit: /etc/systemd/resolved.conf
and set: Cache=no

Cheers.
shamael
Compulsive Poster
Compulsive Poster
Posts: 667
Joined: Sat Oct 08, 2016 9:28 am

Re: Deluge 1.3.15 caching DNS?

Post by shamael »

I guess this disable completely the DNS cache at the OS level. It solves the issue but slower the system with higher DNS queries.
So it's up to you ;). The hostfile has precedence on DNS (cache or not) so at the end you will get the right address. Maybe reducing the DNS cache expiry time (time of the cache) may be the another compromise if you see the cache disabling hurts anything.
Post Reply