When i use the vite (bottom layer is node-http-proxy) to start a http-server and proxy the request to target server, ETIMEDOUT problem occurs frequently.
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript, node.js
- 領域
- backend, networking
調査の方向性
報告されている Vite のプロキシ設定と /stomp および /api へのリクエストから始め、node-http-proxy が接続先への接続をどのように開き、macOS と Windows で ETIMEDOUT をどのように処理するかを追跡します。報告されている HDD および低速なネットワークの条件で動作を再現します。信頼できる原因を特定し、その結果生じる動作を文書化またはテストできれば完了です。
索引モデルが issue の本文から書いたものです。
説明
In vite, I was trying to start a http server with following code
server: {
open: true,
proxy: setupProxy()
}
const setupProxy = () => {
const backendAddr = 'http://192.168.50.213:8180/'
const wsOptions = {
target: backendAddr,
ws: true
}
const httpOptions = {
target: backendAddr,
changeOrigin: true
}
return {
'/stomp': wsOptions,
'/api': httpOptions,
'/pub': httpOptions,
'/docs': httpOptions
}
}
According to the vite document, Its bottom layer uses node-http-proxy.
My problem is that my target server is sure to be accessible, but it will encounter proxy timeout problems from time to time.
Error: connect ETIMEDOUT 192.168.50.213:8180
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1300:16)
3:23:48 PM [vite] http proxy error at /stomp/info?t=1670657002883:
Error: connect ETIMEDOUT 192.168.50.213:8180
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1300:16)
3:23:48 PM [vite] http proxy error at /stomp/info?t=1670657002882:
Error: connect ETIMEDOUT 192.168.50.213:8180
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1300:16)
3:23:48 PM [vite] http proxy error at /api/settings/hiddenMenuPaths:
Error: connect ETIMEDOUT 192.168.50.213:8180
What I can offer is that this problem will not occur when my target server deploys on a ssd, which is, the access speed is very fast.
When I deploy the server on a hdd or when the network environment is more complicated, which is, the access speed is not so fast, but definitely not slow, problem returns.
All my colleagues who use Mac have this problem, but all my colleagues who use Windows don't.
Based on the above phenomenon, I doubt whether there are some special configurations for the mac version of nodejs, such as the default timeout time, fault tolerance or automatic retry mechanism, which causes frequent timeout problems when the target server apis are slightly slower.
- 主要言語
- JavaScript
- スター
- 14.1k
- フォーク
- 2k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
http-party/node-http-proxy のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
http-party/node-http-proxy#1719 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
http-party/node-http-proxy#1721 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 55/100
http-party/node-http-proxy#1715 · コメント 1 件 · リアクション 5 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 15/100
http-party/node-http-proxy#1711 · コメント 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
http-party/node-http-proxy#1710 · リアクション 5 件 ·
http-party/node-http-proxy の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
guybedford/es-module-lexer#266 ·
-
bug documentation
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
apify/apify-docs#3206 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
anhnt256/cursor-swarm#21 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
zerohourzulu/irontrellis#16 ·