Getting occasional dns lookup timeouts when load testing, which are not being retried #1605
Replies: 6 comments 1 reply
-
It's hard to say what's going on without a reproducible code. You may want to have a look at https://github.com/sindresorhus/got#dnscache |
Beta Was this translation helpful? Give feedback.
-
Thanks for the fast response @szmarczak ! The dnsCache is just I will investigate more... |
Beta Was this translation helpful? Give feedback.
-
What tool are you using to stress test your app? What about your DNS server - does it handle your load? You can limit the retry time via a |
Beta Was this translation helpful? Give feedback.
-
We are using flood.io to stress test. The DNS server is AWS route 53, using private dns within the VPC, so together with the dns caching I would assume that wouldn't be the problem. I configured just a lookup timeout now, and I can see that worked a couple of times, and the retry hook showed it retrying and then succeeding which is great. But I still get three dns timeouts where the retry hook was not invoked a single time which is odd, and the timeout is about 2 minutes which is also peculiar. |
Beta Was this translation helpful? Give feedback.
-
So what seems to be happening is that the socket is opened, but for whatever reason the timeout is not setup for the dns lookup sometimes. Could it be related to got/source/core/utils/timed-out.ts Line 121 in d0cd709 Seems unlikely as I assume the idea for this is if its already connected, no need for the timeout. |
Beta Was this translation helpful? Give feedback.
-
By the way, what's your Node.js version? |
Beta Was this translation helpful? Give feedback.
-
What would you like to discuss?
I am load testing our platform, and in a run I usually get a handful of dns lookup errors (since it opens socket but doesnt finish the lookup):
I have this configuration:
I was trying to use got to retry after one second if there is a lookup failure,
but when I add retry hooks I don't see any retries being attemptedConfirmed that some dns failures do retry successfully, but I still get some DNS failures that timeout after a couple of minutes, which do not trigger any retries (no retry hooks logged)Checklist
Beta Was this translation helpful? Give feedback.
All reactions