Gitea: Error 404 on pull request with large repository

Created on 5 Nov 2019  路  8Comments  路  Source: go-gitea/gitea

  • Gitea version (or commit ref): 1.8.0 with go version 1.12.4
  • Git version: 2.20.1
  • Operating system: Alpine Linux in Docker
  • Database (use [x]):

    • [ ] PostgreSQL

    • [X] MySQL

    • [ ] MSSQL

    • [ ] SQLite

  • Can you reproduce the bug at https://try.gitea.io:

    • [ ] Yes (provide example URL)

    • [ ] No

    • [ ] Not relevant

  • Log gist:

Description

I created an empty repository in an organization. Then i forked that in my userspace and added two versions of intellij in it. All binary files are splitted in 10MB files with 7-Zip. The size of the repo is ~ 1,13GB. Now i tried to merge that into the original source repository. After ~10 seconds i get a 404 error. What can i do to locate the failure?
Regards and thanks in advance
Dave

kinquestion

Most helpful comment

Have you tried to change the git timeout setting in your app.ini?

All 8 comments

We could do with some logs from the gitea server.

In the gitea.log i found the following line:

2019/11/05 20:15:22 [...routers/repo/pull.go:943 CompareAndPullRequestPost()] [E] NewPullRequest: testPatch: git apply --check: exec(1406:testPatch (git apply --check): 2) failed: signal: killed(context deadline exceeded) stdout: stderr: -

This problem still exists, we have a much smaller repo on codeberg.org, the PR diff size is probably around 13MB, and git apply --check also timeouts, resulting in a 500 error.

We had a "friendly" user rage quitting codeberg over it and claiming it would work in gogs.

I forked the project where this happened here
https://codeberg.org/test/cloudflare-tor

and then here

https://codeberg.org/test2/cloudflare-tor

created a pull request from branch "httperror" to master

https://codeberg.org/test/cloudflare-tor/compare/master...test2:httperror

after clicking on the final create pull request we get the timeout.

I think there is not much to do about it except increasing the timeout for the git apply --check command.... :(

EDIT: I am not affiliated with that repo, otherwise then using it for testing.

Have you tried to change the git timeout setting in your app.ini?

@lunny
Thanks, that fixed the problem.
I thought the sample app.ini were the default, but when I filled in exactly these then it works.

DEFAULT = 360 MIGRATE = 600 MIRROR = 300 CLONE = 300 PULL = 300 GC = 60

Thanks @lunny !

Hi,

i increased PULL and DEFAULT to 20000. When i create the pull request, i get a 404 after ~20 seconds. But when i wait ~2-5 minutes the pull requests appears and can be used for merging. So the issue itself is solved for me, but the ui will end in a 404. Should i close this issue or would you leave that for open for further analysis?

Regards Dave

@Fickeldave

With newer gitea you won't get 404 when doing this, I guess, I only got 500 because of the timeout. And that was my fault, because I did not set timeouts properly.

You should update gitea to stable 1.9.x, 1.8.0 is no longer supported AFAIK.

Ok fine thanks. Than we can close that.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thehowl picture thehowl  路  3Comments

jonasfranz picture jonasfranz  路  3Comments

flozz picture flozz  路  3Comments

tuxfanou picture tuxfanou  路  3Comments

haytona picture haytona  路  3Comments