-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Very slow HTTPS (even to hosts in the same network) #628
Comments
DNS cache was discussed before, I cannot find the thread. I remember that, the conclusion is that Node.js do not provide dns cache function. It is not easy to add this on my own. A workaround: specify --dns "your local server" in the |
I konwed it, thank you wery much.
…------------------ 原始邮件 ------------------
发件人: "louislam/uptime-kuma" ***@***.***>;
发送时间: 2021年10月10日(星期天) 中午11:46
***@***.***>;
***@***.***>;
主题: Re: [louislam/uptime-kuma] Very slow HTTPS (even to hosts in the same network) (#628)
DNS cache was discussed before, I cannot find the thread.
I remember that, the conclusion is that Node.js do not provide dns cache function. It is not easy to add this on my own.
A workaround: specify --dns "your local server" in the docker run command.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
@louislam I've tried that but nothing seems to improve. |
@louislam Thoughts on this library: https://www.npmjs.com/package/cacheable-lookup There's also an axios compatible one here: https://npmjs.com/package/axios-cached-dns-resolve |
Somehow it managed to get even worse...
For now I'll go back to some other uptime monitor, Kuma is not very usable in my case as it is right now. I'll keep checking in on it since I really love the idea and I'll try again in a few months. I'm very sorry :/ |
Wow this is exactly what we need! The axios one is in ESM tho, I'm not sure if we can use it. |
Is the TTL of that record too short? And also make sure you are not using the alpine tag. |
It seems like nodejs natively suffers from DNS caching issues. There's a huge discussion about it here: nodejs/node#8436 Suggested solutions are: |
TTL is 300 for some of the records and 150 for others, it's longer than the interval of the monitors.
I'm using the |
I think this should be moved back to a bug since there is something messed up with the name resolution. If I monitor https://google.com reponse times are regularly between 10400ms and 10600ms. One particularity of my system is that I'm running Adguard to filter ads and malicious site, but the response is very fast, plus I have rewritten mydomain.local and it returns a local IP within 0.02ms, and other sites are returned within 26ms, google is even faster. Running version 1.11.4 in a docker container (louislam/uptime-kuma:1) |
Here is an update: ;; reply from unexpected source: 172.17.0.1#53, expected 192.168.3.11#53 where 172.17.0.x is my docker network and 192.168.3.x is my home LAN. The problem is this adguard instance is running in a container in the same docker host. I changed the host DNS to 1.1.1.1 and the times are as expected. I changed it again to an adguard instance outside docker but in my network and times are also as expected. Aparently I'm not only one with tha issue: The thing is that all the containers I have running in this instance work correctly, the only one with issues that I know is uptime kuma. So in my opinion there are 2 issues, one is the 'unexpected source' message from the docker setup, and the other is that uptime kuma is maybe too strict in the dns queries origin (not sure if on purpose or by chance). |
Fixed in axios-cached-dns-resolve |
Is it a duplicate question?
Couldn't find anything
Describe the bug
HTTP(S) requests take a tremendous long time.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Pings in the same local network should not be over 500 ms, but they are.
Info
Uptime Kuma Version: 1.7.3
Using Docker?: Yes
Docker Version: Docker version 20.10.7, build 20.10.7-0ubuntu1~20.04.2
OS: Ubuntu server 20.04 LTS kernel 5.4.0-88-generic
Browser: Firefox 93.0
Docker logs:
Monitor #2 is going a public DNS record, but the host is on the same virtual machine and all my other machines in the same network take <1ms to get to it.
Monitor #1 is a remote host that normally has around ~50ms ping from my network.
Monitor #3 is also a public DNS record that points to my public IP and, again, its <1ms for all the other hosts, but a lot higher from Kuma.
It's not really a problem since it works fine, but I'd like them to be quicker, so that I can spot problems quicker. I'm guessing this is because Kuma doesn't use any DNS caching (or the local adguard server) but goes throught the NS every time. Is there any way to improve this?
The text was updated successfully, but these errors were encountered: