502 Bad Gateway -
We are running GitLab on a server with 3713MB of memory. And we are getting the NGINX 502 Bad Gateway error way too often.
Currently I'm getting that error and the server still has 2622MB of free memory so I don't believe that is the problem which it seems to be for most others.
In the nginx error log I see: 18789#0: *1167 upstream prematurely closed connection while reading response header from upstream ... upstream: "http://unix:/home/git/gitlab/tmp/sockets/gitlab.socket:/"
The only other errors I can find are in unicorn.stderr.log:
E, [2014-01-14T13:32:27.217938 #19039 (closed)] ERROR -- : worker=0 PID:23348 timeout (61s > 60s), killing E, [2014-01-14T13:32:27.224191 #19039 (closed)] ERROR -- : reaped #<Process::Status: pid 23348 SIGKILL (signal 9)> worker=0 I, [2014-01-14T13:32:27.227886 #30878 (closed)] INFO -- : worker=0 ready E, [2014-01-14T13:33:31.287957 #19039 (closed)] ERROR -- : worker=1 PID:23372 timeout (61s > 60s), killing E, [2014-01-14T13:33:31.294522 #19039 (closed)] ERROR -- : reaped #<Process::Status: pid 23372 SIGKILL (signal 9)> worker=1 I, [2014-01-14T13:33:31.298307 #30896 (closed)] INFO -- : worker=1 ready
So obviously it's timing out for some reason. Why I don't know.