Commit 04c43806 authored by Douwe Maan's avatar Douwe Maan

Merge branch '39977-gitlab-shell-default-timeout' into 'master'

Set the default gitlab-shell timeout to 3 hours

Closes #39977

See merge request gitlab-org/gitlab-ce!15292
parents e2e4d18f afd59115
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
%li %li
If your HTTP repository is not publicly accessible, add authentication information to the URL: <code>https://username:password@gitlab.company.com/group/project.git</code>. If your HTTP repository is not publicly accessible, add authentication information to the URL: <code>https://username:password@gitlab.company.com/group/project.git</code>.
%li %li
The import will time out after 15 minutes. For repositories that take longer, use a clone/push combination. The import will time out after #{time_interval_in_words(Gitlab.config.gitlab_shell.git_timeout)}.
For repositories that take longer, use a clone/push combination.
%li %li
To migrate an SVN repository, check out #{link_to "this document", help_page_path('user/project/import/svn')}. To migrate an SVN repository, check out #{link_to "this document", help_page_path('user/project/import/svn')}.
---
title: Set the default gitlab-shell timeout to 3 hours
merge_request: 15292
author:
type: fixed
...@@ -559,8 +559,8 @@ production: &base ...@@ -559,8 +559,8 @@ production: &base
upload_pack: true upload_pack: true
receive_pack: true receive_pack: true
# Git import/fetch timeout # Git import/fetch timeout, in seconds. Defaults to 3 hours.
# git_timeout: 800 # git_timeout: 10800
# If you use non-standard ssh port you need to specify it # If you use non-standard ssh port you need to specify it
# ssh_port: 22 # ssh_port: 22
......
...@@ -429,7 +429,7 @@ Settings.gitlab_shell['ssh_port'] ||= 22 ...@@ -429,7 +429,7 @@ Settings.gitlab_shell['ssh_port'] ||= 22
Settings.gitlab_shell['ssh_user'] ||= Settings.gitlab.user Settings.gitlab_shell['ssh_user'] ||= Settings.gitlab.user
Settings.gitlab_shell['owner_group'] ||= Settings.gitlab.user Settings.gitlab_shell['owner_group'] ||= Settings.gitlab.user
Settings.gitlab_shell['ssh_path_prefix'] ||= Settings.__send__(:build_gitlab_shell_ssh_path_prefix) Settings.gitlab_shell['ssh_path_prefix'] ||= Settings.__send__(:build_gitlab_shell_ssh_path_prefix)
Settings.gitlab_shell['git_timeout'] ||= 800 Settings.gitlab_shell['git_timeout'] ||= 10800
# #
# Workhorse # Workhorse
......
...@@ -101,8 +101,7 @@ module Gitlab ...@@ -101,8 +101,7 @@ module Gitlab
# #
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/387 # Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/387
def import_repository(storage, name, url) def import_repository(storage, name, url)
# Timeout should be less than 900 ideally, to prevent the memory killer # The timeout ensures the subprocess won't hang forever
# to silently kill the process without knowing we are timing out here.
cmd = [gitlab_shell_projects_path, 'import-project', cmd = [gitlab_shell_projects_path, 'import-project',
storage, "#{name}.git", url, "#{Gitlab.config.gitlab_shell.git_timeout}"] storage, "#{name}.git", url, "#{Gitlab.config.gitlab_shell.git_timeout}"]
gitlab_shell_fast_execute_raise_error(cmd) gitlab_shell_fast_execute_raise_error(cmd)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment