You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Cristian Pini <cr...@fsite.com> on 2009/11/26 18:18:46 UTC

[users@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-/start-
[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


RE: [users@httpd] mod_proxy issue - intermittent 502 response

Posted by Haroon Rafique <ha...@utoronto.ca>.
On Today at 9:52am, CP=>Cristian Pini <cr...@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#envsettings
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
<ha...@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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: RE: [users@httpd] mod_proxy issue - intermittent 502 response

Posted by Tom Evans <te...@googlemail.com>.
On Fri, Nov 27, 2009 at 9:52 AM, Cristian Pini <cr...@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

Re: RE: [users@httpd] mod_proxy issue - intermittent 502 response

Posted by Zachary Uram <ne...@gmail.com>.
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: RE: [users@httpd] mod_proxy issue - intermittent 502 response

Posted by Cristian Pini <cr...@fsite.com>.
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

-----Original Message-----
From: Boyle Owen [mailto:Owen.Boyle@six-group.com]
Sent: 27 November 2009 09:17
To: users@httpd.apache.org
Subject: RE: [users@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@fsite.com]
        Sent: Thursday, November 26, 2009 6:19 PM
        To: users@httpd.apache.org
        Subject: [users@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-/start-

        [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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] mod_proxy issue - intermittent 502 response

Posted by Boyle Owen <Ow...@six-group.com>.
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@fsite.com] 
	Sent: Thursday, November 26, 2009 6:19 PM
	To: users@httpd.apache.org
	Subject: [users@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-/start-

	[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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org