Unhandled stream error in pipe. Timeout._onTimeout
Closed this issue · 1 comments
Opensourcecommunitydevelopment commented
nice To see this agentpool. If Connection is good stable, it keeps creating a new Agent just Fine As I watched it now. Makes it more reliable over long time use. Well here is first errors i could reproduce.
Perhaps assume Agent To be faulty if ETIMEDOUT or check agent state before sending request, create new agent when agent Connection Lost.
Issue:
But with Default Setting, if tcp Connection closed two times. timeout kills it.
Note i closed the last Agent Connection i was seeing by Network in tcp manually. Two times each running.
[1477335892459/192/udp4] query dns.google.com IN AAAA: 213.177ms
Exceed pool maxSockets, creating a new Agent
Exceed pool maxSockets, creating a new Agent
[1477335904639/194/udp4] query dns.google.com IN AAAA: 775.732ms
[1477335901508/193/udp4] query dns.google.com IN AAAA: 5002.269ms
request error Error: ETIMEDOUT
request error Error: ETIMEDOUT
[1477335914973/196/udp4] query dns.google.com IN AAAA: 180.633ms
[1477335911100/195/udp4] query dns.google.com IN AAAA: 5017.017ms
request error Error: ETIMEDOUT
request error Error: ETIMEDOUT
[1477335915968/197/udp4] query dns.google.com IN AAAA: 634.341ms
[1477335917612/198/udp4] query dns.google.com IN AAAA: 153.931ms
[1477335918963/199/udp4] query dns.google.com IN AAAA: 144.956ms
[1477335919323/200/udp4] query dns.google.com IN AAAA: 174.744ms
[1477335919600/201/udp4] query dns.google.com IN AAAA: 413.346ms
[1477335920092/202/udp4] query dns.google.com IN AAAA: 188.164ms
[1477335920371/203/udp4] query dns.google.com IN AAAA: 301.873ms
[1477335920907/204/udp4] query dns.google.com IN AAAA: 224.692ms
[1477335921415/205/udp4] query dns.google.com IN AAAA: 577.275ms
[1477335922194/206/udp4] query dns.google.com IN AAAA: 196.912ms
[1477335922499/207/udp4] query dns.google.com IN AAAA: 253.411ms
[1477335922938/208/udp4] query dns.google.com IN AAAA: 225.621ms
[1477335923415/209/udp4] query dns.google.com IN AAAA: 186.591ms
[1477335927859/210/udp4] query dns.google.com IN AAAA: 5001.364ms
request error Error: ETIMEDOUT
request error Error: ETIMEDOUT
[1477335935337/211/udp4] query dns.google.com IN AAAA: 5001.259ms
request error Error: ETIMEDOUT
request error Error: ETIMEDOUT
[1477335941060/212/udp4] query dns.google.com IN AAAA: 5000.766ms
request error Error: ETIMEDOUT
request error Error: ETIMEDOUT
[1477335947215/213/udp4] query dns.google.com IN AAAA: 5001.534ms
request error Error: ETIMEDOUT
request error Error: ETIMEDOUT
[1477335953088/214/udp4] query dns.google.com IN AAAA: 5001.386ms
request error Error: ETIMEDOUT
request error Error: ETIMEDOUT
[1477335959788/215/udp4] query dns.google.com IN AAAA: 5002.692ms
request error Error: ETIMEDOUT
request error Error: ETIMEDOUT
stream.js:74
throw er; // Unhandled stream error in pipe.
^
Error: ETIMEDOUT
at Timeout._onTimeout (C:\app\yyfrankyy\node_modules\request\request.js:759:15)
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5)
PS C:\app\yyfrankyy> node .\dns-over-http2\index.js
Exceed pool maxSockets, creating a new Agent
[1477336033348/217/udp4] query dns.google.com IN AAAA: 1201.679ms
[1477336035917/218/udp4] query dns.google.com IN AAAA: 119.984ms
[1477336037250/219/udp4] query dns.google.com IN AAAA: 264.863ms
[1477336038089/220/udp4] query dns.google.com IN AAAA: 172.062ms
[1477336038696/221/udp4] query dns.google.com IN AAAA: 222.884ms
[1477336039202/222/udp4] query dns.google.com IN AAAA: 187.021ms
[1477336039736/223/udp4] query dns.google.com IN AAAA: 141.968ms
[1477336040189/224/udp4] query dns.google.com IN AAAA: 286.275ms
[1477336040639/225/udp4] query dns.google.com IN AAAA: 175.310ms
[1477336041169/226/udp4] query dns.google.com IN AAAA: 219.336ms
[1477336041636/227/udp4] query dns.google.com IN AAAA: 218.828ms
[1477336042116/228/udp4] query dns.google.com IN AAAA: 266.861ms
[1477336044618/229/udp4] query dns.google.com IN AAAA: 252.162ms
[1477336045089/230/udp4] query dns.google.com IN AAAA: 222.127ms
[1477336045581/231/udp4] query dns.google.com IN AAAA: 150.765ms
[1477336047578/232/udp4] query dns.google.com IN AAAA: 383.554ms
[1477336048700/233/udp4] query dns.google.com IN AAAA: 405.680ms
Exceed pool maxSockets, creating a new Agent
[1477336059013/235/udp4] query dns.google.com IN AAAA: 1377.028ms
[1477336056528/234/udp4] query dns.google.com IN AAAA: 5002.261ms
request error Error: ETIMEDOUT
request error Error: ETIMEDOUT
[1477336062387/236/udp4] query dns.google.com IN AAAA: 5001.224ms
request error Error: ETIMEDOUT
request error Error: ETIMEDOUT
[1477336068536/237/udp4] query dns.google.com IN AAAA: 5000.370ms
request error Error: ETIMEDOUT
request error Error: ETIMEDOUT
[1477336075330/238/udp4] query dns.google.com IN AAAA: 5001.855ms
request error Error: ETIMEDOUT
request error Error: ETIMEDOUT
[1477336084832/239/udp4] query dns.google.com IN A: 5001.703ms
request error Error: ETIMEDOUT
request error Error: ETIMEDOUT
[1477336091574/240/udp4] query dns.google.com IN A: 160.410ms
[1477336093342/241/udp4] query dns.google.com IN A: 303.905ms
stream.js:74
throw er; // Unhandled stream error in pipe.
^
Error: ETIMEDOUT
at Timeout._onTimeout (C:\app\yyfrankyy\node_modules\request\request.js:759:15)
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5)
PS C:\app\yyfrankyy> node .\dns-over-http2\index.js
Exceed pool maxSockets, creating a new Agent
[1477336168206/242/udp4] query dns.google.com IN A: 1175.152ms
[1477336171339/243/udp4] query dns.google.com IN A: 151.063ms
[1477336172470/244/udp4] query dns.google.com IN A: 142.233ms
[1477336173431/245/udp4] query dns.google.com IN A: 171.075ms
[1477336174352/246/udp4] query dns.google.com IN A: 106.235ms
[1477336175248/247/udp4] query dns.google.com IN A: 145.000ms
Exceed pool maxSockets, creating a new Agent
[1477336239210/248/udp4] query dns.google.com IN A: 1125.833ms
Exceed pool maxSockets, creating a new Agent
[1477336251853/249/udp4] query dns.google.com IN A: 776.282ms
[1477336276844/252/udp4] query dns.google.com IN A: 132.581ms
[1477336280599/253/udp4] query dns.google.com IN A: 134.638ms
[1477336281288/254/udp4] query dns.google.com IN A: 116.424ms
[1477336290051/255/udp4] query dns.google.com IN A: 5002.527ms
request error Error: ETIMEDOUT
request error Error: ETIMEDOUT
stream.js:74
throw er; // Unhandled stream error in pipe.
^
Error: ETIMEDOUT
at Timeout._onTimeout (C:\app\yyfrankyy\node_modules\request\request.js:759:15)
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5)
PS C:\app\yyfrankyy> node .\dns-over-http2\index.js
Exceed pool maxSockets, creating a new Agent
[1477336368713/23041/udp4] query dns.google.com IN A: 960.108ms
[1477336372574/279/udp4] query dns.google.com IN A: 132.970ms
[1477336376407/54035/udp4] query dns.google.com IN A: 121.612ms
[1477336379548/13914/udp4] query dns.google.com IN A: 159.797ms
[1477336380345/13784/udp4] query dns.google.com IN A: 112.050ms
[1477336382409/20190/udp4] query dns.google.com IN A: 129.664ms
Exceed pool maxSockets, creating a new Agent
[1477336387686/54992/udp4] query dns.google.com IN A: 5003.602ms
request error Error: ETIMEDOUT
request error Error: ETIMEDOUT
[1477336392686/54992/udp4] query dns.google.com IN A: 615.964ms
[1477336414340/33003/udp4] query dns.google.com IN A: 200.432ms
[1477336416037/38704/udp4] query dns.google.com IN A: 118.119ms
[1477336416917/570/udp4] query dns.google.com IN A: 180.957ms
[1477336418621/2658/udp4] query dns.google.com IN A: 158.877ms
stream.js:74
throw er; // Unhandled stream error in pipe.
^
Error: ETIMEDOUT
at Timeout._onTimeout (C:\app\yyfrankyy\node_modules\request\request.js:759:15)
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5)
If this Thing can be fixed. dns-over-http2 would become very reliable resolver now. Even Running On Laptop On Public Hotspots or Mobil Internet.