neitomic / doh-server

An implementation of DNS server which supports DNS over HTTPS
1 stars 1 forks source link

server hangs, not responsive while running benchmark #12

Closed sonhmai closed 6 days ago

sonhmai commented 1 week ago

server hangs, not responsive while running benchmark

running make bench

First bench - hanged at ampproject.org

# ignore many logs
  2024-06-23T04:37:45.406813Z DEBUG doh_server::dns: attempting lookup of A ampproject.org with ns 198.41.0.4
    at src/dns/mod.rs:46
    in tower_http::trace::make_span::request with method: GET, uri: /dns-query?name=ampproject.org&type=A, version: HTTP/1.1

# server hanged here and did not process further requests

reset the server and ampproject.org resolved without issue

curl -H "accept: application/dns-json" "https://localhost/dns-query?name=ampproject.org&type=A" -k

{"AD":false,"Answer":[{"A":{"addr":"172.217.25.14","domain":"ampproject.org","ttl":285}}],"CD":false,"Question":[{"name":"ampproject.org","qtype":"A"}],"RA":true,"RD":true,"Status":0,"TC":false}%

Second bench - hanged at bytefcdn-oversea.com

# many logs...

  2024-06-23T04:43:21.044307Z DEBUG doh_server::dns: attempting lookup of A bytefcdn-oversea.com with ns 198.41.0.4
    at src/dns/mod.rs:46
    in tower_http::trace::make_span::request with method: GET, uri: /dns-query?name=bytefcdn-oversea.com&type=A, version: HTTP/1.1

# server hanged here and did not process further requests

reset the server and it resolved without issue

curl -H "accept: application/dns-json" "https://localhost/dns-query?name=bytefcdn-oversea.com&type=A" -k | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   134  100   134    0     0   8744      0 --:--:-- --:--:-- --:--:--  8933
{
  "AD": false,
  "Answer": [],
  "CD": false,
  "Question": [
    {
      "name": "bytefcdn-oversea.com",
      "qtype": "A"
    }
  ],
  "RA": true,
  "RD": true,
  "Status": 0,
  "TC": false
}
sonhmai commented 1 week ago

suspects (?)

can replicate on other machines?

neitomic commented 1 week ago

Yes, happens on any machine.

sonhmai commented 6 days ago

solved with #15