Thursday, December 4, 2008

502 Error: Bad Proxy

In the process of performance testing the examinator reference application of Terracotta, we faced a lots of 502 errors. During the performance testing few of the virtual users were receiving 502 error from the load balancer.

Load balancer: Apache HTTP server, mod_proxy_balancer module
App Server: Tomcat 6

The error received were



<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="/examinator/exam/">GET&nbsp;/examinator/exam/</a></em>.<p>

Reason: <strong>Error reading from remote server</strong></p></p>


<address>Apache/2.2.3 (Linux/SUSE) Server at Port 80</address>


By disabling keepAlive on tomcat server, we were able to reduce these errors.

<Connector port="8080" protocol="HTTP/1.1"
redirectPort="8443" />

No comments: