-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Resource exhaustion produces misleading error message #8155
Comments
You are probably being rate limited by your DNS provider. We do not cache DNS queries at the moment. It might sound counter intuitive, but can you try increase your request rate? That might keep the HTTP connection open for longer, reducing the amount of DNS queries needed. Also are you using Deno.HttpClient? If so are you creating a new one for each request? |
I'm using the If the DNS is getting hit at the same rate as the fetches being issued, that's still only 1 request every 4 seconds. Not saying that someone wouldn't rate limit that, but I wonder. It also makes me wonder why closing the app and restarting wouldn't still be affected by the DNS rate limit if one had been imposed. Can't really increase the request rate because while the client is self-limiting currently, it would likely get rate limited by the server on the actual request if I increase the rate. |
Makes sense. I can't think of why this may happen other than the dns caching. |
Do you have a long-running test that exercises |
Not really no. |
One more potentially useful piece of info: the server supports HTTP2. Are there any long-running Deno tests? I suspect the bug is in the bowels of I'm working around the issue by letting the client app crash on the first error and adding a monitor app that respawns it. Do you know if there's an environment variable or something that I can set that will force a Deno app to use only HTTP 1.1 so I can see if it's HTTP2-related? |
New info: is failing consistently at exactly 120 consecutive requests to same server. |
@lucacasonato Maybe you already found this bug back in July: seanmonstar/reqwest#976 Looks pretty similar: A limit of 120 on HTTP2 requests. Doesn't appear to require the requests to be made quickly though. |
@callionica they are different errors. The already reported one definitely requires it to happen quickly (it happens with ~100 simultaneous connections). |
Just doing a run that isn't showing the error after I added calls to Process.close and Process.stderr.close. Maybe it was a handle/resource limit showing up in a random place. Is the Deno resource table limited in size? |
Here's the final bug report with a small repro: Title: Summary: Steps to reproduce: Run the code below on Deno 1.50 on Mac OS X 10.13.6
Actual result:
Desired result: If it is impractical to change
Notes: |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I met a similar error when using a tool I wrote in Rust with tokio, any idea about how could I fix it? |
--- EDIT ---
See this comment for the real issue:
#8155 (comment)
--- ORIGINAL ---
A client app that that does many fetches to a web server eventually hits "error trying to connect: dns error: failed to lookup address information: nodename nor servname provided, or not known". Once this error is hit, no future fetch will succeed until the app is restarted. Restarting the app allows fetches to succeed instantly so it's definitely not a persistent problem in the network - it's limited to the Deno app - and the app includes carefully written retry code, so it's definitely not a case of getting lucky or unlucky with the timing.
As an example, the client app started at 19:46, did one fetch every 4-6 seconds, and hit the error at 20:00.
The length of time to see the error seems variable.
Clues or red herrings that could explain why you haven't see in your own testing:
The server is a CDN
The client is on a high latency satellite connection
deno 1.5.0
v8 8.7.220.3
typescript 4.0.3
(Also present on Deno 1.4.6)
The text was updated successfully, but these errors were encountered: