Project

General

Profile

problem uploading files : 502 Bad Gateway

Added by CM Gui over 12 years ago

Hi All

We are having this intermittent problem when submitting an update with file attachments (very small file size) to a issue. Get this error page: 502 Bad Gateway.

We checked our error log (nginx-error.log) and found a few of this error:

2011/05/16 13:51:14 [error] 9831#0: *6749 upstream prematurely closed connection while reading response header from upstream, client: 74.92.197.213, server: , request: "POST /issues/3286 HTTP/1.1", upstream: "http://unix:/tmp/thin.0.sock:/issues/3286", host: "server.domain.com", referrer: "https://server.domain.com/issues/3286" 

And in the /tmp directory, there are a bunch of thin-bodyYYYMMDD-xxx-xxxxx-x files which contains the contents the user was trying to submit (time stamps of the files correspond to the time of the error). These files never got cleared, i.e., they remained in /tmp forever.

This is our setup:

1) Redmine version 1.2.1

2) OS: Freebsd 8.1

3) Redmine built from Freebsd ports collection.

4) Redmine running behind Thin web (rubygem-thin-1.2.11) = this is how the Freebsd Redmine port installed Redmine

5) To implement https, we installed Ngnix webserver according to the instructions here:
http://www.redmine.org/projects/redmine/wiki/HowTo_configure_Nginx_to_run_Redmine
We configured Redmine to run 16 Thin sockets, and Ngnix to connect to 16 upstream sockets.

Our setup works most of the time except this intermittent problem. When we restart the server (restart redmine, thin, nginx), the problem goes away for a while. After that, it reappears again.

Can anybody advise?

Thank you very much in anticipation.

cmgui