Egg http request

when using the curl that comes with egg, it will report an error intermittently. Why?

at errnoException (dns.js:50:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)
code: "ENOTFOUND"
errno: "ENOTFOUND"
syscall: "getaddrinfo"
hostname: "test.com"
host: "test.com"
port: 80
name: "RequestError"
data: undefined
path: "/test"
status: -1
headers: {}
res: {"status":-1,"statusCode":-1,"headers":{},"size":0,"aborted":false,"rt":5,"keepAliveSocket":false,"requestUrls":["http://test.com/test"],"timing":null,"remoteAddress":"","remotePort":"","socketHandledRequests":1,"socketHandledResponses":0}
pid: 23297


May.22,2021

  1. getaddrinfo failed to resolve the domain name. If it fails all the time, please check the system DNS configuration and whether the domain name is resolvable.
  2. if it is an intermittent failure, please reduce the number of concurrent curl

I can just remove the http of curl's url

http://test.com
==>
test.com
Menu