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.
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, node.js
- Ambito
- backend, networking
Direzione di ricerca
Inizia dalla configurazione del proxy Vite segnalata e dalle richieste a /stomp e /api, quindi traccia il modo in cui node-http-proxy apre la connessione alla destinazione e gestisce ETIMEDOUT su macOS e Windows. Riproduci il comportamento nelle condizioni segnalate con HDD e rete più lenta; il lavoro è completato quando è stata identificata una causa affidabile e il comportamento risultante è stato documentato o testato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- JavaScript
- Stelle
- 14.1k
- Fork
- 2k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di http-party/node-http-proxy
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
http-party/node-http-proxy#1719 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
http-party/node-http-proxy#1721 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 55/100
http-party/node-http-proxy#1715 · 1 commento · 5 reazioni ·
-
Is this library is dead?Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 15/100
http-party/node-http-proxy#1711 · 2 commenti ·
-
HTTP3 + QUIC support?Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
http-party/node-http-proxy#1710 · 5 reazioni ·
Tutte le issue di http-party/node-http-proxy
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
guybedford/es-module-lexer#266 ·
-
bug documentation
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
apify/apify-docs#3206 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
anhnt256/cursor-swarm#21 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
zerohourzulu/irontrellis#16 ·