A Proxy Error in IBM® HTTP Server causes a 502 error response in the browser.
The user sees a 502 Proxy Error in the browser that says:
The proxy server received an invalid response from an upstream server. The proxy server could not handle the request ....
The IBM HTTP Server error log displays errors similar to:
proxy: Error reading from remote server returned by ....
The most common cause of this problem is when the back-end web server is either not using KeepAlive, or is using too low of a value for KeepAlive.
IBM HTTP Server is configured as a proxy or reverseproxy in front of some other back-end web server.
Resolving the problem
There are 2 possible solutions to this problem:
- Disable KeepAlive in IBM HTTP Server, by adding these directives into your IBM HTTP Server config (httpd.conf):
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
- Increase the KeepAlive value in the back-end web server. The KeepAlive value for the back-end web server should be at least double or triple whatever IBM HTTP Server is using for KeepAlive. The default KeepAlive for IBM HTTP Server is 15 seconds. So the back-end web server should be configured to use KeepAlive of 30 or 45 seconds.