
mod_proxy issue - intermittent 502 response
--_000_4DBC2201FA1D2E4299DC5FDC726ADEC8ED537C54BEgserverhqfs it_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi,
I'm running Apache/2.0.52 as a reverse proxy on a RHE4 box, the backend app=
server is on a separate machine again RHE4, running Apache/2.0.52 and mod_=
perl 1.99_16.
There are intermittent 502 responses being generated by the proxy although =
a page refresh generally resolves the issue, we are trying to get a configu=
ration of 2 RP boxes in front of 3 mod_perl app servers into production but=
will need to understand / resolve the issue of these intermittent 502 resp=
onses first.
[Thu Nov 26 15:35:09 2009] [error] [client 88.96.233.45] proxy: error readi=
ng status line from remote server xxx.xxxxxx.co.uk, referer: http://xxx.xxx=
x.co.uk/mens/casual/casual/71/brand-/all-/start-
[Thu Nov 26 15:35:09 2009] [error] [client 88.96.233.45] proxy: Error readi=
ng from remote server returned by /mens/smart/smart/70/brand-/all-/start-, =
referer: http://xxxx.xxxxxxx.co.uk/mens/casual/casual/71/brand-/all-/ start-
Can someone shed further light on what the problem is and how to resolve it=
pls, I'm happy to send virtual host confs if someone wishes to dig little =
deeper. Note at this point I'm using mod_rewrite [P] to proxy the requests =
to the app server rather than using ProxyPass as we have many rewrites in t=
he conf.
I've googled around and have seen that others have observed similar scenari=
os when using this setup in Apache 2.0 but have not seen anything specific =
about a resolution or path to resolution.
Your help gratefully appreciated.
Kind regards,
Cris
Cristian Pini
Foresite Business Solutions Ltd
Tel: 020 8540 0040
Direct: 020 8545 6813
http://www.fsite.com
--_000_4DBC2201FA1D2E4299DC5FDC726ADEC8ED537C54BEgserverhqfs it_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" xmlns:w=3D"urn:sc=
hemas-microsoft-com:office:word" xmlns:st1=3D"urn:schemas-microsoft-com:off=
ice:smarttags" xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<o:SmartTagType namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
name=3D"PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:Arial;
color:windowtext;}
[at] page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>Hi,<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>I’m running Apache/2.0.52 as a reverse proxy on a =
RHE4
box, the backend app server is on a separate machine again RHE4, running
Apache/2.0.52 and mod_perl 1.99_16. <o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>There are intermittent 502 responses being generated by =
the
proxy although a page refresh generally resolves the issue, we are trying t=
o
get a configuration of 2 RP boxes in front of 3 mod_perl app servers into
production but will need to understand / resolve the issue of these
intermittent 502 responses first.<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><i><font size=3D2 face=3DArial><span style=3D'font-siz=
e:10.0pt;
font-family:Arial;font-style:italic'>[Thu Nov 26 15:35:09 2009] [error] [cl=
ient
88.96.233.45] proxy: error reading status line from remote server
xxx.xxxxxx.co.uk, referer: http://xxx.xxxx.co.uk/mens/casual/casual/71/bran=
d-/all-/start-<o:p></o:p></span></font></i></p>
<p class=3DMsoNormal><i><font size=3D2 face=3DArial><span style=3D'font-siz=
e:10.0pt;
font-family:Arial;font-style:italic'>[Thu Nov 26 15:35:09 2009] [error] [cl=
ient
88.96.233.45] proxy: Error reading from remote server returned by
/mens/smart/smart/70/brand-/all-/start-, referer: http://xxxx.xxxxxxx.co.uk=
/mens/casual/casual/71/brand-/all-/start-<o:p></o:p></span></font></i></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'> <o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>Can someone shed further light on what the problem is an=
d
how to resolve it pls, I’m happy to send virtual host confs if someon=
e
wishes to dig little deeper. Note at this point I’m using mod_rewrite=
[P]
to proxy the requests to the app server rather than using ProxyPass as we h=
ave
many rewrites in the conf.<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>I’ve googled around and have seen that others have
observed similar scenarios when using this setup in Apache 2.0 but have not
seen anything specific about a resolution or path to resolution.<o:p></o:p>=
</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>Your help gratefully appreciated.<o:p></o:p></span></fon=
t></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>Kind regards,<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>Cris<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><st1:PersonName w:st=3D"on"><b><font size=3D3 color=3D=
silver
face=3DArial><span style=3D'font-size:12.0pt;font-family:Arial;color:silve=
r;
font-weight:bold'>Cristian Pini</span></font></b></st1:PersonName><b><font
color=3Dsilver><span style=3D'color:silver;font-weight:bold'><o:p></o:p></s=
pan></font></b></p>
<p class=3DMsoNormal><font size=3D2 color=3Dsilver face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:silver'>Foresite Business Solutions Ltd</spa=
n></font><font
color=3Dsilver><span style=3D'color:silver'><o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dsilver face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:silver'>Tel: 020 8540 0040<o:p></o:p></span>=
</font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dsilver face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:silver'>Direct: 020 8545 6813</span></font><=
font
color=3Dsilver><span style=3D'color:silver'><o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dsilver face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:silver'>http://www.fsite.com</span></font><f=
ont
color=3Dsilver><span style=3D'color:silver'><o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span style=3D=
'font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>
--_000_4DBC2201FA1D2E4299DC5FDC726ADEC8ED537C54BEgserverhqfs it_--
RE: mod_proxy issue - intermittent 502 response
502 is bad gateway, which means that apache and the back-end server have
got into a protocol argument. Usually this is due to a bad response from
the back-end (as your log entries indicate). Why do you think apache is
the problem?
Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored.
________________________________
From: Cristian Pini [mailto:cris.pini [at] fsite.com]
Sent: Thursday, November 26, 2009 6:19 PM
To: users [at] httpd.apache.org
Subject: [users [at] httpd] mod_proxy issue - intermittent 502
response
=09
=09
Hi,
I'm running Apache/2.0.52 as a reverse proxy on a RHE4 box, the
backend app server is on a separate machine again RHE4, running
Apache/2.0.52 and mod_perl 1.99_16.
There are intermittent 502 responses being generated by the
proxy although a page refresh generally resolves the issue, we are
trying to get a configuration of 2 RP boxes in front of 3 mod_perl app
servers into production but will need to understand / resolve the issue
of these intermittent 502 responses first.
[Thu Nov 26 15:35:09 2009] [error] [client 88.96.233.45] proxy:
error reading status line from remote server xxx.xxxxxx.co.uk, referer:
http://xxx.xxxx.co.uk/mens/casual/casual/71/brand-/all-/star t-
[Thu Nov 26 15:35:09 2009] [error] [client 88.96.233.45] proxy:
Error reading from remote server returned by
/mens/smart/smart/70/brand-/all-/start-, referer:
http://xxxx.xxxxxxx.co.uk/mens/casual/casual/71/brand-/all-/ start-
Can someone shed further light on what the problem is and how to
resolve it pls, I'm happy to send virtual host confs if someone wishes
to dig little deeper. Note at this point I'm using mod_rewrite [P] to
proxy the requests to the app server rather than using ProxyPass as we
have many rewrites in the conf.
I've googled around and have seen that others have observed
similar scenarios when using this setup in Apache 2.0 but have not seen
anything specific about a resolution or path to resolution.
Your help gratefully appreciated.
Kind regards,
Cris
Cristian Pini
Foresite Business Solutions Ltd
Tel: 020 8540 0040
Direct: 020 8545 6813
http://www.fsite.com
This message is for the named person's use only. It may contain =
confidential, proprietary or legally privileged information. If you =
receive this message in error, please notify the sender urgently and =
then immediately delete the message and any copies of it from your =
system. Please also immediately destroy any hardcopies of the message.
The sender's company reserves the right to monitor all e-mail =
communications through their networks.
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
RE: RE: mod_proxy issue - intermittent 502 response
Thx for taking the time to read the post.
You're right in that it's difficult to determine whether Apache is the prob=
lem, however, there's nothing sitting between the proxy and the app server =
and the only things that are running on the app server are apache (mod_perl=
) and sendmail.
Having reviewed the access and error log on the proxy I can see an entry fo=
r a request that subsequently fails, however, neither the access or error l=
ogs on the app server have an entry for the request. This suggests that the=
request is never reaching the app server but as there's only one hop betwe=
en them I'm struggling to understand what is happening to the request from =
the proxy.
Rgds,
Cris
-----Original Message-----
From: Boyle Owen [mailto:Owen.Boyle [at] six-group.com]
Sent: 27 November 2009 09:17
To: users [at] httpd.apache.org
Subject: RE: [users [at] httpd] mod_proxy issue - intermittent 502 response
502 is bad gateway, which means that apache and the back-end server have
got into a protocol argument. Usually this is due to a bad response from
the back-end (as your log entries indicate). Why do you think apache is
the problem?
Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored.
________________________________
From: Cristian Pini [mailto:cris.pini [at] fsite.com]
Sent: Thursday, November 26, 2009 6:19 PM
To: users [at] httpd.apache.org
Subject: [users [at] httpd] mod_proxy issue - intermittent 502
response
Hi,
I'm running Apache/2.0.52 as a reverse proxy on a RHE4 box, the
backend app server is on a separate machine again RHE4, running
Apache/2.0.52 and mod_perl 1.99_16.
There are intermittent 502 responses being generated by the
proxy although a page refresh generally resolves the issue, we are
trying to get a configuration of 2 RP boxes in front of 3 mod_perl app
servers into production but will need to understand / resolve the issue
of these intermittent 502 responses first.
[Thu Nov 26 15:35:09 2009] [error] [client 88.96.233.45] proxy:
error reading status line from remote server xxx.xxxxxx.co.uk, referer:
http://xxx.xxxx.co.uk/mens/casual/casual/71/brand-/all-/star t-
[Thu Nov 26 15:35:09 2009] [error] [client 88.96.233.45] proxy:
Error reading from remote server returned by
/mens/smart/smart/70/brand-/all-/start-, referer:
http://xxxx.xxxxxxx.co.uk/mens/casual/casual/71/brand-/all-/ start-
Can someone shed further light on what the problem is and how to
resolve it pls, I'm happy to send virtual host confs if someone wishes
to dig little deeper. Note at this point I'm using mod_rewrite [P] to
proxy the requests to the app server rather than using ProxyPass as we
have many rewrites in the conf.
I've googled around and have seen that others have observed
similar scenarios when using this setup in Apache 2.0 but have not seen
anything specific about a resolution or path to resolution.
Your help gratefully appreciated.
Kind regards,
Cris
Cristian Pini
Foresite Business Solutions Ltd
Tel: 020 8540 0040
Direct: 020 8545 6813
http://www.fsite.com
This message is for the named person's use only. It may contain confidentia=
l, proprietary or legally privileged information. If you receive this messa=
ge in error, please notify the sender urgently and then immediately delete =
the message and any copies of it from your system. Please also immediately =
destroy any hardcopies of the message.
The sender's company reserves the right to monitor all e-mail communication=
s through their networks.
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Re: RE: mod_proxy issue - intermittent 502 response
--00c09f8a5576e372ba0479575aba
Content-Type: text/plain; charset=UTF-8
On Fri, Nov 27, 2009 at 9:52 AM, Cristian Pini <cris.pini [at] fsite.com> wrote:
> Thx for taking the time to read the post.
>
> You're right in that it's difficult to determine whether Apache is the
> problem, however, there's nothing sitting between the proxy and the app
> server and the only things that are running on the app server are apache
> (mod_perl) and sendmail.
>
> Having reviewed the access and error log on the proxy I can see an entry
> for a request that subsequently fails, however, neither the access or error
> logs on the app server have an entry for the request. This suggests that the
> request is never reaching the app server but as there's only one hop between
> them I'm struggling to understand what is happening to the request from the
> proxy.
>
> Rgds,
>
> Cris
>
>
The 502 error basically says that the proxy couldn't connect to the backend
or that the backend responded with something that it couldn't understand.
Examine your network, your backend app and tcpdump the entire exchange. It
is unlikely to have much to do with the proxy, which is why googling for a
solution to your proxy errors did not return anything of note - this is
almost always either the backend not coping, or the network not coping.
Cheers
Tom
--00c09f8a5576e372ba0479575aba
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div class=3D"gmail_quote">On Fri, Nov 27, 2009 at 9:52 AM, Cristian Pini <=
span dir=3D"ltr"><<a href=3D"mailto:cris.pini [at] fsite.com">cris.pini [at] fsite=
..com</a>></span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"bo=
rder-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding=
-left: 1ex;">
Thx for taking the time to read the post.<br>
<br>
You're right in that it's difficult to determine whether Apache is =
the problem, however, there's nothing sitting between the proxy and the=
app server and the only things that are running on the app server are apac=
he (mod_perl) and sendmail.<br>
<br>
Having reviewed the access and error log on the proxy I can see an entry fo=
r a request that subsequently fails, however, neither the access or error l=
ogs on the app server have an entry for the request. This suggests that the=
request is never reaching the app server but as there's only one hop b=
etween them I'm struggling to understand what is happening to the reque=
st from the proxy.<br>
<br>
Rgds,<br>
<br>
Cris<br>
<div class=3D"im"><br>
</div></blockquote></div><br>The 502 error basically says that the proxy co=
uldn't connect to the backend or that the backend responded with someth=
ing that it couldn't understand. Examine your network, your backend app=
and tcpdump the entire exchange. It is unlikely to have much to do with th=
e proxy, which is why googling for a solution to your proxy errors did not =
return anything of note - this is almost always either the backend not copi=
ng, or the network not coping.<br>
<br>Cheers<br><br>Tom<br>
--00c09f8a5576e372ba0479575aba--
Re: RE: mod_proxy issue - intermittent 502 response
Make sure there is no firewall rules blocking it.
Zach
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
RE: mod_proxy issue - intermittent 502 response
On Today at 9:52am, CP=>Cristian Pini <cris.pini [at] fsite.com> wrote:
CP> Thx for taking the time to read the post.
CP>
Hi,
Have you looked at "Protocol Adjustments" at:
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#envsetti ngs
Those settings recently helped me get rid of intermittent 502 errors.
Hope that helps,
CP>
CP> You're right in that it's difficult to determine whether Apache is the
CP> problem, however, there's nothing sitting between the proxy and the
CP> app server and the only things that are running on the app server are
CP> apache (mod_perl) and sendmail.
CP>
CP> Having reviewed the access and error log on the proxy I can see an
CP> entry for a request that subsequently fails, however, neither the
CP> access or error logs on the app server have an entry for the request.
CP> This suggests that the request is never reaching the app server but as
CP> there's only one hop between them I'm struggling to understand what is
CP> happening to the request from the proxy.
CP>
CP> Rgds,
CP>
CP> Cris
CP>
--
Haroon Rafique
<haroon.rafique [at] utoronto.ca>
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org