NethServer Version: 7.9.2009
Module: Web Server
I have a nodeJS application being served by a reverse proxy. I notice that any of my long-running calls get a 502 error like this:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>502 Proxy Error</title> </head><body> <h1>Proxy Error</h1> <p>The proxy server received an invalid response from an upstream server.<br /> The proxy server could not handle the request <em><a href="/t/instances/create">GET /t/instances/create</a></em>.<p> Reason: <strong>Error reading from remote server</strong></p></p> </body></html> * Connection #0 to host my.site.com left intact
and in the apache log I can see:
[Wed Mar 03 01:06:10.985888 2021] [proxy_http:error] [pid 17771] (20014)Internal error: [client 220.127.116.11:39394] AH01102: error reading status line from remote server localhost:3000
[Wed Mar 03 01:06:10.986371 2021] [proxy:error] [pid 17771] [client 18.104.22.168:39394] AH00898: Error reading from remote server returned by /t/instances/create
I suspect it’s due to a timeout, because if I try to connect to the same endpoint again it has no issue.
Has anyone experienced this, and if so - can you advise on the current way to fix this issue of the connection breaking while being proxied? I see some other posts on how to do increase the timeout but they require configuration changes and are a bit old.