Very slow HTTPS (even to hosts in the same network)
See original GitHub issueIs 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:
- Add a new monitor
- Wait a few moments for the data to come in
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 #3 : Successful Response: 70 ms | Interval: 60 seconds | Type: http
Monitor #1 : Successful Response: 164 ms | Interval: 60 seconds | Type: http
Monitor #2 : Successful Response: 710 ms | Interval: 60 seconds | Type: http
Monitor #4 : Successful Response: 46 ms | Interval: 60 seconds | Type: ping
Monitor #3 : Successful Response: 22 ms | Interval: 60 seconds | Type: http
Monitor #1 : Successful Response: 163 ms | Interval: 60 seconds | Type: http
Monitor #2 : Successful Response: 566 ms | Interval: 60 seconds | Type: http
Monitor #5 : Successful Response: 0 ms | Interval: 180 seconds | Type: ping
Monitor #4 : Successful Response: 45 ms | Interval: 60 seconds | Type: ping
Monitor #3 : Successful Response: 21 ms | Interval: 60 seconds | Type: http
Monitor #1 : Successful Response: 144 ms | Interval: 60 seconds | Type: http
Monitor #2 ':Successful Response: 572 ms | Interval: 60 seconds | Type: http
Monitor #4 : Successful Response: 50 ms | Interval: 60 seconds | Type: ping
Monitor #3 :Successful Response: 18 ms | Interval: 60 seconds | Type: http
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?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:12 (6 by maintainers)

Top Related StackOverflow Question
It seems like nodejs natively suffers from DNS caching issues. There’s a huge discussion about it here: https://github.com/nodejs/node/issues/8436
Suggested solutions are:
@louislam Thoughts on this library: https://www.npmjs.com/package/cacheable-lookup They have full dns lookup examples here: https://httptoolkit.tech/blog/configuring-nodejs-dns/
There’s also an axios compatible one here: https://npmjs.com/package/axios-cached-dns-resolve