Link to home
Start Free TrialLog in
Avatar of beer9
beer9Flag for India

asked on

How to fix 'Proxy Error 502'?

I am running a apache web server and then doing reverse proxy to confluence server. when I try to upload some files to confluence server (less than 100MB) it woks fine (it takes around 3 minute to upload)

but I have one big file close to 300MB which takes more than 10 minute to upload and upload gets failed and I get below error:

Proxy Error 502 : The proxy server received an invalid response from an upstream server

Open in new window


Here is my proxy configuration.

#Rewrite rule for Confluence
RewriteCond     %{HTTP_HOST}    ^confluence.example.com     [NC]
RewriteRule     ^/(.*)$ http://11.22.33.44:8090/$1        [P]
ProxyPassReverse / http://11.22.33.44:8090/

I believe issue would be related to timeout setting somewhere. Appreciate if someone can help me in fixing it.
Avatar of LajuanTaylor
LajuanTaylor

It's possible that Apache is timing out before the upload is completed. Check your httpd.conf file settings. See if the values are smaller or large than the following:
Timeout 2400
ProxyTimeout 2400
ProxyBadHeader Ignore

Also, have you tested bypassing the reverse proxy and going directly to the "confluence server" just to make sure that that you are ruling it out as the problem?

Do you know if the upload form is written in PHP? If so, check php.ini setting for:
upload_max_filesize
post_max_size
Avatar of beer9

ASKER

confluence is written in java and running in Tomcat

I see following entry in my httpd.conf
# Timeout: The number of seconds before receives and sends time out.
Timeout 60

Open in new window

Avatar of beer9

ASKER

I bypassed the reverse proxy and uploaded the file directly using url of app server (confluence) then I got below result:

The following error(s) occurred:
Your request could not be processed because a required security token was not present in the request. You may need to re-submit the form or reload the page.

Open in new window

@beer9 - About how long does it take for the 300Meg upload to fail?
ASKER CERTIFIED SOLUTION
Avatar of LajuanTaylor
LajuanTaylor

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial