question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Very slow HTTPS (even to hosts in the same network)

See original GitHub issue

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:

  1. Add a new monitor
  2. 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:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
gabycommented, Oct 10, 2021

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:

1reaction
gabycommented, Oct 10, 2021

@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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Https very slow on LAN only vlan - Spiceworks Community
So, I'm looking for best practice to keep the integrity of the LAN only vlan but still allow for the public cert verification?...
Read more >
HTTPS very slow when in internal network - Linux - Emby
Hi, my HTTPS connection in my internal network to Emby are very slow. I am experiencing response times of ~3 seconds per request...
Read more >
HTTPS traffic 40x slower than HTTP in Windows 10 x64
I have tried another Windows 10 PC with the same issue (same Windows install). What could cause HTTPS to be 40x slower than...
Read more >
7 Common Network Issues and How to Resolve Them Fast
Slow performance is typically due to congestion, or sometimes poor quality connections that have corroded or otherwise deteriorated. Congestion ...
Read more >
SSL connections very slow to localhost IIS 8 but work fine from ...
As the title says, I have a web server on which ssl connections initiated from the local server are extremely slow - 1...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found