Download of tar, tar.gz, tar.bz2 and zip fails and blocks tab (sometimes whole gitlab)
Created by: nudgegoonies
Hi, when starting a download of a branch, tag, commit etc. the tab blocks until it runs in a timeout and the nginx gives a "504 Gateway Time-out":
2014/05/05 10:51:23 [error] 30226#0: *2 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.144.1, server: gitlab.server.lan, request: "GET /root/test/repository/archive.zip?ref=master HTTP/1.1", upstream: "http://unix:/home/git/gitlab/tmp/sockets/gitlab.socket:/root/test/repository/archive.zip?ref=master", host: "gitlab.server.lan", referrer: "http://gitlab.server.lan/root/test/tree/master"
The first thing i did was raising the timeout of nginx and unicorn from 30 to 300 seconds but it does not help. As i can see the compression is fast enough so this is not the problem. I used a fresh gitlab installation with a test repo and the zip file of the master branch in "/home/git/gitlab/tmp/repositories/test.git" ist created fast enough, but the unicorn runs in a timeout:
E, [2014-05-05T10:51:24.012241 #30159] ERROR -- : worker=5 PID:30181 timeout (301s > 300s), killing
E, [2014-05-05T10:51:24.018936 #30159] ERROR -- : reaped #<Process::Status: pid 30181 SIGKILL (signal 9)> worker=5
Directly accessing the unicorn does not help too so the nginx is not the problem. When the zip file is created and i try it a second time the download works, but only if there was no commit since the last try. If there was a commit gitlab starts to compress again and runs in the same timeout.
When more downloads in other tabs or browsers are started and all unicorn workers are used then the whole gitlab is blocked.
Version 6.3.0 does not has this error so it must be introduced in the versions between.
This is my output of info and check:
System information
System: Debian 7.1
Current User: git
Using RVM: no
Ruby Version: 1.9.3p194
Gem Version: 1.8.23
Bundler Version:1.1.4
Rake Version: 10.1.1
Sidekiq Version:2.17.0
GitLab information
Version: 6.8.1
Revision: 3197990
Directory: /home/git/gitlab
DB Adapter: mysql2
URL: http://gitlab.server.lan
HTTP Clone URL: http://gitlab.server.lan/some-project.git
SSH Clone URL: [email protected]:some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 1.9.3
Repositories: /home/git/repositories/
Hooks: /home/git/gitlab-shell/hooks/
Git: /usr/bin/git
Checking Environment ...
Git configured for git user? ... yes
Checking Environment ... Finished
Checking GitLab Shell ...
GitLab Shell version >= 1.9.3 ? ... OK (1.9.3)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
Satellites access is drwxr-x---? ... yes
update hook up-to-date? ... yes
update hooks in repos are links: ...
Administrator / test ... ok
Running /home/git/gitlab-shell/bin/check
Check GitLab API access: OK
Check directories and files:
/home/git/repositories: OK
/home/git/.ssh/authorized_keys: OK
Test redis-cli executable: redis-cli 2.4.14
Send ping to redis server: PONG
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
Database contains orphaned UsersGroups? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... yes
projects have namespace: ...
Administrator / test ... yes
Projects have satellites? ...
Administrator / test ... yes
Redis version >= 2.0.0? ... yes
Your git bin path is "/usr/bin/git"
Git version >= 1.7.10 ? ... yes (1.7.10)
Checking GitLab ... Finished
Maybe this is related:
I, [2014-05-05T10:45:20.211212 #30159] INFO -- : Refreshing Gem list
Instance method "lock!" is already defined in ActiveRecord::Base, use generic helper instead or set StateMachine::Machine.ignore_method_conflicts = true.
Kind regards, Andreas