ReverseProxy Timeout configuration

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:

<title>502 Proxy Error</title>
<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&nbsp;/t/instances/create</a></em>.<p>
Reason: <strong>Error reading from remote server</strong></p></p>
* Connection #0 to host 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] AH01102: error reading status line from remote server localhost:3000
[Wed Mar 03 01:06:10.986371 2021] [proxy:error] [pid 17771] [client] 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.

Maybe setting setting “ProxyTimeout 600” helps (default is 60 seconds).


Thanks - but the action is already less than 60 seconds, it’s more like 10 seconds, so I think it may be another issue.

The apache errors were a red herring and it was completely unrelated. My application did have errors and was throwing exceptions. Thanks for the help!