[a little OT] mod_proxy 502 errors in dual apache setup

[a little OT] mod_proxy 502 errors in dual apache setup

am 05.03.2008 16:12:50 von 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

Re: [a little OT] mod_proxy 502 errors in dual apache setup

am 05.03.2008 16:37:35 von Adam Prime

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/mod_proxy.html#proxytim eout

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

Re: [a little OT] mod_proxy 502 errors in dual apache setup

am 05.03.2008 23:07:07 von Perrin Harkins

On Wed, Mar 5, 2008 at 10:37 AM, wrote:
> 502's show up when you have more connections from the front end to the
> back end that it can service.

Just to expand on that a little, you should start by checking for
simple things like whether your machine was going into swap or getting
hung up on a particular database query. If you're running the maximum
mod_perl processes you can fit without going into swap, you either
need to extend the timeout and let people wait or add more hardware.

- Perrin