Timeout when downloading archives


Hello all,

I have a large repo (~1GB) and I am getting a timeout after 60s when I try to either download a zip/tar or a release archive.

I am running in Docker swarm, with the data externalised in a MySQL cluster and GlusterFS. Sessions/cache in Redis (also in Swarm). I tried storing the repos locally as a test and got the same result.

It is definitely creating the archive though - if I try again a bit later, the archive downlaods as expected.


A couple of questions:

  • Could you post any logs you might have?
  • Can you get the archive from the filesystem and see if it extracts?
  • Are you running Gitea behind a reverse proxy such as Traefik, Caddy, or Nginx?

An unrelated question: On docker swarm how are you handling SSH git operations, are you running SSH on a different port, or are you just using HTTP(S) only git operations.

Thanks :slight_smile:


For large repos it can be problematic as for first time it needs to create archive file that can take some time. That should probably be created as asynchronous task with some kind of progressbar in future


For SSH I do --publish 1002:22 so I effectively bypass SSH on the hosts.


I agree is is problematic, hence I bought it up here. I think yes, having some sort of job queue is pretty essential.


I am running behind Traefik with responseHeaderTimeout set to 0 (so no timeout). Bypassing Traefik and hitting Gitea service directly gives the same result (as expected given the parameters).

For logs:

git_gitea.1.kjjde5oioxj3@docker01    | [Macaron] 2018-01-19 10:46:08: Completed /S3N/bms/archive/master.tar.gz 500 Internal Server Error in 1m1.593707152s
git_gitea.1.kjjde5oioxj3@docker01    | [Macaron] 2018-01-19 10:46:09: Started GET /img/500.png for
git_gitea.1.kjjde5oioxj3@docker01    | [Macaron] [Static] Serving /img/500.png
git_gitea.1.kjjde5oioxj3@docker01    | [Macaron] 2018-01-19 10:46:09: Completed /img/500.png 200 OK in 11.80947ms

And sure enough, the archive the creation of the archive has been truncated:

tar xvf <my-archive>.tar.gz
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now

As @lafriks says, the obvious solution is an asynchronous job queue.