-
-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setting max-cache-ttl to 0 causes slowdown problems #137
Comments
yeah would be really nice to have it configurable via env variable. +1 |
+1 for making this configurable. I also found this one while doing some testing. If I find some time next week I will create a PR for this :) |
This issue has been automatically marked as inactive because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed after being inactive for 30 days. If you require further assistance please reopen the issue with more details or talk to us on discord |
Describe the issue you are having
with the change from last that set max-cache-ttl to 0, the lancache DNS service is now quite slow. each lookup can take one or two full seconds, and subsequent checks are not cached at all so they also take a second or two. Further more, even a downstream pihole will not cache the hits because the TTL was set to zero.
The change was made with commit #131
of the three changes to the options file:
'forward-only' seems fine, and it accomplishes the goal of that commit.
'max-ncache-ttl' doesn't seem to break anything, although the default bind value is 10800
'max-cache-ttl' of 0 is the problem. Per the docs, the default value is 604800, and zero should not be used because it may cause SERVFAIL errors.
https://bind9.readthedocs.io/en/latest/reference.html#namedconf-statement-max-ncache-ttl
I've personally modified it to 10,000 and it works well.
my recommendation is to leave in the forward only line and strip out the other two. (barring an enhancement to let the user set the cache values)
How are you running the container(s)
docker compose, pulled latest.
version: '2.1'
services:
dns:
image: lancachenet/lancache-dns:latest
env_file: .env
restart: unless-stopped
and in .env
IP address on the host that the DNS server should bind to
DNS_BIND_IP=192.168.3.204
DNS Resolution for forwarded DNS lookups
UPSTREAM_DNS=149.112.112.11;9.9.9.11
I have nothing.
The text was updated successfully, but these errors were encountered: