proxy 502 problem uploading a large file

proxy 502 problem uploading a large file

am 25.11.2009 00:27:39 von Scott Chapman

I have Apache 2.2.11 and a web server behind it (CherryPy).
When I upload a large file to the CherryPy server, I see the file in
/tmp/modrproxy.tmp.FOO
It uploads completely.
Then Apache returns a 502 error without ever hitting the backend (the
first line of code in the handler is to spit out a log line saying it
was reached).

The access and error logs are below and my virtual host config.
I can't think what else to try. I was using RewriteRules for this.
Same situation.

This is a production server and it's having problems. Any help would be
greatly appreciated.

Scott


access log
- - [24/Nov/2009:16:13:46 -0500] "POST
/lertwfm/addFileToCase HTTP/1.1" 502 422

error log
[Tue Nov 24 16:18:23 2009] [error] [client ] (70014)End of
file found: proxy: error reading status line from remote server
127.0.0.1, referer:
http://lertwfmdev.odc.vzwcorp.com/lertwfm/detail_edit_case?c ase_id=6667
[Tue Nov 24 16:18:23 2009] [error] [client ] proxy: Error
reading from remote server returned by /lertwfm/addFileToCase, referer:
http://lertwfmdev.odc.vzwcorp.com/lertwfm/detail_edit_case?c ase_id=6667



DocumentRoot "/opt/webapp/wfm"
ServerName foo.bar.com
ErrorLog "|/usr/local/apache2/bin/rotatelogs
/usr/local/apache2/logs/lert_wfm-error_log 86400"
CustomLog "|/usr/local/apache2/bin/rotatelogs
/usr/local/apache2/logs/lert_wfm-access_log 86400" common


FileETag None

ExpiresActive On
ExpiresDefault "access plus 2 hours"

Order allow,deny
allow from all
SetHandler default-handler


ProxyPass /static/ !
ProxyPass /lertwfm/static/js/ !
ProxyPass /fax/ http://127.0.0.1:9010/fax/
ProxyPass / http://127.0.0.1:9000/ connectiontimeout=900 timeout=900


Order allow,deny
allow from all






------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: proxy 502 problem uploading a large file

am 25.11.2009 11:00:22 von Boyle Owen

> -----Original Message-----
> From: Scott Chapman [mailto:schapman@mischko.com]=20
> Sent: Wednesday, November 25, 2009 12:28 AM
> To: users@httpd.apache.org
> Subject: [users@httpd] proxy 502 problem uploading a large file
>=20
> I have Apache 2.2.11 and a web server behind it (CherryPy).
> When I upload a large file to the CherryPy server, I see the file in
> /tmp/modrproxy.tmp.FOO
> It uploads completely.
> Then Apache returns a 502 error without ever hitting the backend (the
> first line of code in the handler is to spit out a log line saying it
> was reached).

502 is Bad Gateway, which means that apache and back-end had a protocol
problem. Probably the back-end didn't handle the upload correctly. What
do the back-end logs say?

You mention a "large" file without saying what that means 1 Mb? 1 Gb? 1
Tb? what happens with a "small" file (10 b, 1 kb, 10 kb...)?

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored.=20

>=20
> The access and error logs are below and my virtual host config.
> I can't think what else to try. I was using RewriteRules for this.
> Same situation.
>=20
> This is a production server and it's having problems. Any=20
> help would be
> greatly appreciated.
>=20
> Scott
>=20
>=20
> access log
> - - [24/Nov/2009:16:13:46 -0500] "POST
> /lertwfm/addFileToCase HTTP/1.1" 502 422
>=20
> error log
> [Tue Nov 24 16:18:23 2009] [error] [client ] (70014)End of
> file found: proxy: error reading status line from remote server
> 127.0.0.1, referer:
> http://lertwfmdev.odc.vzwcorp.com/lertwfm/detail_edit_case?c as
e_id=3D6667
> [Tue Nov 24 16:18:23 2009] [error] [client ] proxy: Error
> reading from remote server returned by=20
> /lertwfm/addFileToCase, referer:
> http://lertwfmdev.odc.vzwcorp.com/lertwfm/detail_edit_case?c as
e_id=3D6667
>=20
>=20
>
> DocumentRoot "/opt/webapp/wfm"
> ServerName foo.bar.com
> ErrorLog "|/usr/local/apache2/bin/rotatelogs
> /usr/local/apache2/logs/lert_wfm-error_log 86400"
> CustomLog "|/usr/local/apache2/bin/rotatelogs
> /usr/local/apache2/logs/lert_wfm-access_log 86400" common
>=20
>
> FileETag None
>=20
> ExpiresActive On
> ExpiresDefault "access plus 2 hours"
>=20
> Order allow,deny
> allow from all
> SetHandler default-handler
>

>=20
> ProxyPass /static/ !
> ProxyPass /lertwfm/static/js/ !
> ProxyPass /fax/ http://127.0.0.1:9010/fax/
> ProxyPass / http://127.0.0.1:9000/ connectiontimeout=3D900 =
timeout=3D900
>=20
>
> Order allow,deny
> allow from all
>

>=20
>

>=20
>=20
>=20
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP=20
> Server Project.
> See 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
>=20
>=20
=20
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.=20
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 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: proxy 502 problem uploading a large file

am 25.11.2009 14:15:31 von Prigge Scott

Hi Scott, I recently posted a message to the group about a 502 error I was =
getting:

http://mail-archives.apache.org/mod_mbox/httpd-users/200911. mbox/%3c9A7D621=
3F32E30428D8C94E8441C8AC85C8A8F3B@edxmb25.jdnet.deere.com%3e

Given the description of your environment, it's not clear if my situation r=
elates. But consider a possible TCP timeout with your back-end server. In m=
y case, I was able to adjust a Linux parameter to increase the number of SY=
N-ACK packets the OS sent to keep the TCP connection alive - not a great so=
lution, but a verified workaround.

> -----Original Message-----
> From: Scott Chapman [mailto:schapman@mischko.com]=20
> Sent: Tuesday, November 24, 2009 5:28 PM
> To: users@httpd.apache.org
> Subject: [users@httpd] proxy 502 problem uploading a large file
>=20
> I have Apache 2.2.11 and a web server behind it (CherryPy).
> When I upload a large file to the CherryPy server, I see the=20
> file in /tmp/modrproxy.tmp.FOO It uploads completely.
> Then Apache returns a 502 error without ever hitting the=20
> backend (the first line of code in the handler is to spit out=20
> a log line saying it was reached).
>=20
> The access and error logs are below and my virtual host config.
> I can't think what else to try. I was using RewriteRules for this.
> Same situation.
>=20
> This is a production server and it's having problems. Any=20
> help would be greatly appreciated.
>=20
> Scott
=

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: proxy 502 problem uploading a large file

am 25.11.2009 15:28:09 von Scott Chapman

Boyle Owen wrote:
>> -----Original Message-----
>> From: Scott Chapman [mailto:schapman@mischko.com]
>> Sent: Wednesday, November 25, 2009 12:28 AM
>> To: users@httpd.apache.org
>> Subject: [users@httpd] proxy 502 problem uploading a large file
>>
>> I have Apache 2.2.11 and a web server behind it (CherryPy).
>> When I upload a large file to the CherryPy server, I see the file in
>> /tmp/modrproxy.tmp.FOO
>> It uploads completely.
>> Then Apache returns a 502 error without ever hitting the backend (the
>> first line of code in the handler is to spit out a log line saying it
>> was reached).
>>
>
> 502 is Bad Gateway, which means that apache and back-end had a protocol
> problem. Probably the back-end didn't handle the upload correctly. What
> do the back-end logs say?
>
> You mention a "large" file without saying what that means 1 Mb? 1 Gb? 1
> Tb? what happens with a "small" file (10 b, 1 kb, 10 kb...)?
>
> Rgds,
> Owen Boyle
> Disclaimer: Any disclaimer attached to this message may be ignored.
>
>
Large is 70mb. Small is 20mb. Small files work great. It's some kind of
timeout I think. The backend never got hit by Apache at all.
The backend handles the uploads fine when I hit it directly, out from
behind Apache.



------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: proxy 502 problem uploading a large file

am 25.11.2009 15:46:16 von Scott Chapman

Your post has the same stuff mine does. I'm using SiteMinder for
enterprise single sign on via Apache. I turned it off and the upload
worked.

Thanks!

Prigge Scott wrote:
> Hi Scott, I recently posted a message to the group about a 502 error I was getting:
>
> http://mail-archives.apache.org/mod_mbox/httpd-users/200911. mbox/%3c9A7D6213F32E30428D8C94E8441C8AC85C8A8F3B@edxmb25.jdn et.deere.com%3e
>
> Given the description of your environment, it's not clear if my situation relates. But consider a possible TCP timeout with your back-end server. In my case, I was able to adjust a Linux parameter to increase the number of SYN-ACK packets the OS sent to keep the TCP connection alive - not a great solution, but a verified workaround.
>
>
>> -----Original Message-----
>> From: Scott Chapman [mailto:schapman@mischko.com]
>> Sent: Tuesday, November 24, 2009 5:28 PM
>> To: users@httpd.apache.org
>> Subject: [users@httpd] proxy 502 problem uploading a large file
>>
>> I have Apache 2.2.11 and a web server behind it (CherryPy).
>> When I upload a large file to the CherryPy server, I see the
>> file in /tmp/modrproxy.tmp.FOO It uploads completely.
>> Then Apache returns a 502 error without ever hitting the
>> backend (the first line of code in the handler is to spit out
>> a log line saying it was reached).
>>
>> The access and error logs are below and my virtual host config.
>> I can't think what else to try. I was using RewriteRules for this.
>> Same situation.
>>
>> This is a production server and it's having problems. Any
>> help would be greatly appreciated.
>>
>> Scott
>>
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See 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 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: proxy 502 problem uploading a large file

am 25.11.2009 15:57:01 von Prigge Scott

:D

I just saved you about a month worth of work...

Try adding this directive to your SM policy:
LegacyStreamingBehavior =3D YES=20

> -----Original Message-----
> From: Scott Chapman [mailto:schapman@mischko.com]=20
> Sent: Wednesday, November 25, 2009 8:46 AM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] proxy 502 problem uploading a large file
>=20
> Your post has the same stuff mine does. I'm using SiteMinder=20
> for enterprise single sign on via Apache. I turned it off=20
> and the upload worked.
>=20
> Thanks!=

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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