You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Scott Chapman <sc...@mischko.com> on 2009/11/25 00:27:39 UTC

[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


access log
<IPADDRESS> - - [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 <IPADDRESS>] (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?case_id=6667
[Tue Nov 24 16:18:23 2009] [error] [client <IPADDRESS>] proxy: Error
reading from remote server returned by /lertwfm/addFileToCase, referer:
http://lertwfmdev.odc.vzwcorp.com/lertwfm/detail_edit_case?case_id=6667


<VirtualHost *>
    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

  <Location ~ "^/static/.*$">
    FileETag None

    ExpiresActive On
    ExpiresDefault "access plus 2 hours"

    Order allow,deny
    allow from all
    SetHandler default-handler
  </Location>

  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

  <Location ~ "^(?!/static/).*$">
    Order allow,deny
    allow from all
  </Location>

</VirtualHost>



---------------------------------------------------------------------
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] proxy 502 problem uploading a large file

Posted by Prigge Scott <Pr...@JohnDeere.com>.
:D

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

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

> -----Original Message-----
> From: Scott Chapman [mailto:schapman@mischko.com] 
> Sent: Wednesday, November 25, 2009 8:46 AM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] proxy 502 problem uploading a large file
> 
> 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!
---------------------------------------------------------------------
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] proxy 502 problem uploading a large file

Posted by Scott Chapman <sc...@mischko.com>.
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.jdnet.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 <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] proxy 502 problem uploading a large file

Posted by Prigge Scott <Pr...@JohnDeere.com>.
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.jdnet.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 <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] proxy 502 problem uploading a large file

Posted by Scott Chapman <sc...@mischko.com>.
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 <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] proxy 502 problem uploading a large file

Posted by Boyle Owen <Ow...@six-group.com>.
> -----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. 

> 
> 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
> <IPADDRESS> - - [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 <IPADDRESS>] (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?cas
e_id=6667
> [Tue Nov 24 16:18:23 2009] [error] [client <IPADDRESS>] proxy: Error
> reading from remote server returned by 
> /lertwfm/addFileToCase, referer:
> http://lertwfmdev.odc.vzwcorp.com/lertwfm/detail_edit_case?cas
e_id=6667
> 
> 
> <VirtualHost *>
>     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
> 
>   <Location ~ "^/static/.*$">
>     FileETag None
> 
>     ExpiresActive On
>     ExpiresDefault "access plus 2 hours"
> 
>     Order allow,deny
>     allow from all
>     SetHandler default-handler
>   </Location>
> 
>   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
> 
>   <Location ~ "^(?!/static/).*$">
>     Order allow,deny
>     allow from all
>   </Location>
> 
> </VirtualHost>
> 
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 
 
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