Topic: 502 Proxy Error

Hi guys I am receiving the below error when performing an query in our database.  Sometimes it works after a long period of time and sometimes I just get the below proxy error.  What can I do to enhance the performance?

-----------------------------------------------------------------------------------------------
Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request POST /reports/map_branches.

Reason: Error reading from remote server

Apache/2.0.54 Server at foo.foofoo.com Port 80


Completed in 47.09911 (0 reqs/sec) | Rendering: 43.69497 (92%) | DB: 0.04134 (0%) | 200 OK [http://foo.foofoo.com/reports/map_branches]
Completed in 47.13996 (0 reqs/sec) | Rendering: 43.75841 (92%) | DB: 0.03778 (0%) | 200 OK [http://foo.foofoo.com/reports/map_branches]
Completed in 29.45921 (0 reqs/sec) | Rendering: 26.08529 (88%) | DB: 0.04032 (0%) | 200 OK [http://foo.foofoo.com/reports/map_branches]
Completed in 47.93194 (0 reqs/sec) | Rendering: 44.50980 (92%) | DB: 0.03982 (0%) | 200 OK [http://foo.foofoo.com/reports/map_branches]

Re: 502 Proxy Error

You might need to post a bit more information for somebody to help you.

Its taking an average of 40 odd seconds to render your page when it is successful which is not good.

You would probably need to post the relevant code from your model, view and controller.