Skip to content

Default command timeout used for git archive #11551

@fpiecka

Description

@fpiecka
  • Gitea version (or commit ref): 1.11.5
  • Git version: 2.11.0
  • Operating system: Debian 9
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant (issue depends on hosting machine performance and repo content, but it should be reproducible)
  • Log gist: Nothing can be found in logs, which I consider a bug too. Could we log timeout reached as ERROR or at least WARNING?

Description

We have a 700MB+ release in ZIP format which cannot be downloaded from gitea.

Manually running git archive (using the same parameters as gitea runs it with) takes 1m3.466s of real time (0m53.936s user + 0m6.416s system) on our machine. It seems it is just over 60 second limit defined in:

// DefaultCommandExecutionTimeout default command execution timeout duration
DefaultCommandExecutionTimeout = 60 * time.Second

I can see git archive is called without a specific timeout set:

_, err := NewCommand(args...).RunInDir(c.repo.Path)

git.timeout/DEFAULT should be used instead of DefaultCommandExecutionTimeout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions