-
Type:
Suggestion
-
Resolution: Fixed
-
Component/s: Enterprise
-
None
Under very heavy load, a Bitbucket Server instance launched in AWS from the Bitbucket AMI may report 504 Gateway timeout errors.
The nginx/error.log contains many messages of the form:
2016/01/12 06:31:07 [error] 3488#0: *112277 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.0.0.103, server: ec2-54-206-17-128.ap-southeast-2.compute.amazonaws.com, request: "POST /rest/api/1.0/projects/ruby/repos/Sinatra/pull-requests/398/merge?version=0 HTTP/1.1", upstream: "http://127.0.0.1:7990/rest/api/1.0/projects/ruby/repos/Sinatra/pull-requests/398/merge?version=0", host: "ec2-54-206-17-128.ap-southeast-2.compute.amazonaws.com" 2016/01/12 06:31:08 [error] 3488#0: *112299 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.0.0.104, server: ec2-54-206-17-128.ap-southeast-2.compute.amazonaws.com, request: "POST /rest/api/1.0/projects/coffeescript/repos/apm/pull-requests/466/merge?version=0 HTTP/1.1", upstream: "http://127.0.0.1:7990/rest/api/1.0/projects/coffeescript/repos/apm/pull-requests/466/merge?version=0", host: "ec2-54-206-17-128.ap-southeast-2.compute.amazonaws.com" 2016/01/12 06:31:19 [error] 3488#0: *112245 upstream timed out (110: Connection timed out) while reading upstream, client: 10.0.0.104, server: ec2-54-206-17-128.ap-southeast-2.compute.amazonaws.com, request: "POST /scm/groove/grails-core.git/git-upload-pack HTTP/1.1", upstream: "http://127.0.0.1:7990/scm/groove/grails-core.git/git-upload-pack", host: "ec2-54-206-17-128.ap-southeast-2.compute.amazonaws.com"
The relevant timeouts in Nginx should be increased by default to make it more resilient to heavy Git hosting workloads over HTTP.