Revert "Increase timeout for Git-over-HTTP requests."
This reverts commit 516bcabbf4
.
Conflicts:
Gemfile
This commit is contained in:
parent
915c7b9455
commit
efd8491d49
3
Gemfile
3
Gemfile
|
@ -180,9 +180,6 @@ gem 'mousetrap-rails'
|
||||||
# Detect and convert string character encoding
|
# Detect and convert string character encoding
|
||||||
gem 'charlock_holmes'
|
gem 'charlock_holmes'
|
||||||
|
|
||||||
# Shutting down requests that take too long
|
|
||||||
gem "slowpoke"
|
|
||||||
|
|
||||||
gem "sass-rails", '~> 4.0.2'
|
gem "sass-rails", '~> 4.0.2'
|
||||||
gem "coffee-rails"
|
gem "coffee-rails"
|
||||||
gem "uglifier"
|
gem "uglifier"
|
||||||
|
|
|
@ -147,7 +147,6 @@ GEM
|
||||||
enumerize (0.7.0)
|
enumerize (0.7.0)
|
||||||
activesupport (>= 3.2)
|
activesupport (>= 3.2)
|
||||||
equalizer (0.0.8)
|
equalizer (0.0.8)
|
||||||
errbase (0.0.2)
|
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
escape_utils (0.2.4)
|
escape_utils (0.2.4)
|
||||||
eventmachine (1.0.4)
|
eventmachine (1.0.4)
|
||||||
|
@ -429,7 +428,6 @@ GEM
|
||||||
rack
|
rack
|
||||||
rack-test (0.6.3)
|
rack-test (0.6.3)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
rack-timeout (0.2.0)
|
|
||||||
rails (4.1.9)
|
rails (4.1.9)
|
||||||
actionmailer (= 4.1.9)
|
actionmailer (= 4.1.9)
|
||||||
actionpack (= 4.1.9)
|
actionpack (= 4.1.9)
|
||||||
|
@ -482,8 +480,6 @@ GEM
|
||||||
rest-client (1.6.7)
|
rest-client (1.6.7)
|
||||||
mime-types (>= 1.16)
|
mime-types (>= 1.16)
|
||||||
rinku (1.7.3)
|
rinku (1.7.3)
|
||||||
robustly (0.0.3)
|
|
||||||
errbase
|
|
||||||
rouge (1.7.4)
|
rouge (1.7.4)
|
||||||
rspec (2.99.0)
|
rspec (2.99.0)
|
||||||
rspec-core (~> 2.99.0)
|
rspec-core (~> 2.99.0)
|
||||||
|
@ -566,9 +562,6 @@ GEM
|
||||||
temple (~> 0.6.6)
|
temple (~> 0.6.6)
|
||||||
tilt (>= 1.3.3, < 2.1)
|
tilt (>= 1.3.3, < 2.1)
|
||||||
slop (3.6.0)
|
slop (3.6.0)
|
||||||
slowpoke (0.0.5)
|
|
||||||
rack-timeout (>= 0.1.0)
|
|
||||||
robustly
|
|
||||||
spinach (0.8.7)
|
spinach (0.8.7)
|
||||||
colorize (= 0.5.8)
|
colorize (= 0.5.8)
|
||||||
gherkin-ruby (>= 0.3.1)
|
gherkin-ruby (>= 0.3.1)
|
||||||
|
@ -778,7 +771,6 @@ DEPENDENCIES
|
||||||
six
|
six
|
||||||
slack-notifier (~> 1.0.0)
|
slack-notifier (~> 1.0.0)
|
||||||
slim
|
slim
|
||||||
slowpoke
|
|
||||||
spinach-rails
|
spinach-rails
|
||||||
spring (~> 1.3.1)
|
spring (~> 1.3.1)
|
||||||
spring-commands-rspec (= 1.0.4)
|
spring-commands-rspec (= 1.0.4)
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
# Slowpoke extends Rack::Timeout to gracefully kill Unicorn workers so they can clean up state.
|
|
||||||
Slowpoke.timeout = 60
|
|
||||||
|
|
||||||
# The `Rack::Timeout` middleware kills requests after 60 seconds (as set above).
|
|
||||||
# We're replacing it with our `Gitlab::Middleware::Timeout` that does the same,
|
|
||||||
# except ignoring Git-over-HTTP requests, letting those take as long as they need.
|
|
||||||
|
|
||||||
Rails.application.config.middleware.swap(Rack::Timeout, Gitlab::Middleware::Timeout)
|
|
|
@ -35,10 +35,22 @@ working_directory "/home/git/gitlab" # available in 0.94.0+
|
||||||
listen "/home/git/gitlab/tmp/sockets/gitlab.socket", :backlog => 1024
|
listen "/home/git/gitlab/tmp/sockets/gitlab.socket", :backlog => 1024
|
||||||
listen "127.0.0.1:8080", :tcp_nopush => true
|
listen "127.0.0.1:8080", :tcp_nopush => true
|
||||||
|
|
||||||
# Kill workers after 1 hour.
|
# nuke workers after 30 seconds instead of 60 seconds (the default)
|
||||||
# A shorter timeout of 60 seconds is enforced by rack-timeout for web requests.
|
#
|
||||||
# Git-over-HTTP only has the below timeout since large pulls/pushes can take a long time.
|
# NOTICE: git push over http depends on this value.
|
||||||
timeout 60 * 60
|
# If you want be able to push huge amount of data to git repository over http
|
||||||
|
# you will have to increase this value too.
|
||||||
|
#
|
||||||
|
# Example of output if you try to push 1GB repo to GitLab over http.
|
||||||
|
# -> git push http://gitlab.... master
|
||||||
|
#
|
||||||
|
# error: RPC failed; result=18, HTTP code = 200
|
||||||
|
# fatal: The remote end hung up unexpectedly
|
||||||
|
# fatal: The remote end hung up unexpectedly
|
||||||
|
#
|
||||||
|
# For more information see http://stackoverflow.com/a/21682112/752049
|
||||||
|
#
|
||||||
|
timeout 60
|
||||||
|
|
||||||
# feel free to point this anywhere accessible on the filesystem
|
# feel free to point this anywhere accessible on the filesystem
|
||||||
pid "/home/git/gitlab/tmp/pids/unicorn.pid"
|
pid "/home/git/gitlab/tmp/pids/unicorn.pid"
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
module Gitlab
|
|
||||||
module Middleware
|
|
||||||
class Timeout < Rack::Timeout
|
|
||||||
GRACK_REGEX = /[-\/\w\.]+\.git\//.freeze
|
|
||||||
|
|
||||||
def call(env)
|
|
||||||
return @app.call(env) if env['PATH_INFO'] =~ GRACK_REGEX
|
|
||||||
|
|
||||||
super
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,13 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Page took too long to load (503)</title>
|
|
||||||
<link href="/static.css" media="screen" rel="stylesheet" type="text/css" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>503</h1>
|
|
||||||
<h3>Page took too long to load.</h3>
|
|
||||||
<hr/>
|
|
||||||
<p>Please contact your GitLab administrator if this problem persists.</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
Reference in New Issue