502's show up when you have more connections from the front end to the
back end that it can service. The proxy server has a timeout [1], and
if it doesn't get a response within that time frame you get a 502.

You can create a custom error document on your front end for 502's to
make them a little less jarring.

[1] http://httpd.apache.org/docs/2.2/mod...l#proxytimeout

Quoting John ORourke :

> Hi folks,
> Slightly OT but hopefully someone on here has had similar experience.
> I've got a site with fairly heavy traffic and a light/heavy apache
> setup. Occasionally the back-end servers seem to get swamped and
> suddenly every request from the front end starts getting a 502 proxy
> timeout until I restart both apache servers.
> I'm about to start digging through logs to try and track down the issue
> but wondered if anyone who's seen this before could give me a head
> start.
> cheers
> John