node-http-proxy icon indicating copy to clipboard operation
node-http-proxy copied to clipboard

Serious pitfall: If Upstream doesn't respond in time, but does respond again after a while, Proxy will never work because the 'socket hangs up' has destroyed httpagent....

Open introspection3 opened this issue 3 years ago • 2 comments

Serious pitfall: If Upstream doesn't respond in time, but does respond again after a while, Proxy will never work because the 'socket hangs up' has destoryed httpagent....

introspection3 avatar Nov 21 '22 01:11 introspection3

Hey @introspection3 do you have additional insights or a test case? We're facing sporadic problems which might be related to that but haven't been able to nail it down for quite some time.

frankboehmer avatar Nov 26 '22 12:11 frankboehmer

Have seen this regularly when proxying azure functions apps.

The general process:

  1. Start function app
  2. Start proxy
  3. Close function app
  4. Make request to function app that times out, with an ECONNREFUSED error
  5. Start function app
  6. Subsequent requests fail
  7. Close proxy
  8. Restart proxy
  9. Requests work again

timtucker-dte avatar Mar 15 '24 14:03 timtucker-dte